Colors のバックアップソース(No.1)

In some filters ([[BlankClip]], [[Letterbox]], [[AddBorders]] and [[FadeXXX>Fade]]) a color argument can specified. In all cases the color should be specified in RGB format even if the colorformat of the input clip is YUV. This can be done in decimal or hexadecimal notation. The decimal (hexadecimal) notation is as follows: the first three (two) numbers denote the red channel, the next three (two) the green channel and the last three (two) the blue channel. The hexadecimal number should be preceded with a $.

Let's consider an example. Brown is given by R=165, G=42, B=42. Thus BlankClip(color=165042042) gives a brown frame. Converting each channel to hexadecimal (remember that A=10, B=11, C=12, D=14, E=14, F=15) gives

 R = 165 = A*16^1 + 5*16^0 = A5
 G = 42 = 2*16^1 + A = 2A
 B = 42 = 2*16^1 + A = 2A

Thus creating a brown frame specifying the color in hexadecimal notation gives BlankClip(color=$A52A2A).

Note that black RGB=$000000 will be converted to Y=16, U=V=128 if the colorformat of the input clip is YUV, since the default color conversion RGB [0,255] -> YUV [16,235] is used. 

//#hr
//
//[[Colors - avisynth.org:http://www.avisynth.org/Colors]]