method | effect | h | s | v | as |
---|---|---|---|---|---|
light | raise light level | ±0 | ±0 | +50 | |
dark | lower light level | ±0 | ±0 | -50 | |
bright | brighter color | ±0 | +50 | +50 | |
dull | greyer color | ±0 | -50 | -50 | |
neon | set to extreme | ±0 | max | max |
light and dark lower/highers saturation when value is min-/maximised respective.
They give an array of
red, green and blue (rgb) values (color value),
hue, saturation and value (hsv) values (range as color value),
cyan, magenta, yellow, black (cmyk) values (in percent)
or the greylevel value (range as color value).
The greylevel is calculated by weighting red, green and blue. Default weights are 87, 127 and 41, respective, and could be given by argument.
hex() simply gives a string on the #rrggbb format. If n is given, the number of significant digits is set to this number. (Ie, n=3 gives #rrrgggbbb.)
name() is a simplified method; if the color exists in the database, the name is returned, per default is the hex() method use.
html() gives the HTML name of the color, or the hex(2) if it isn't one of the 16 HTML colors.
object red=Image.Color.red; object other=Image.Color. ...; object black=Image.Color.black;if (red==other) ... if (red==({255,0,0})) ... if (black==0) ... if (red=="red") ...