Invert GMLscripts.com

Graphics :: Color

Here you will find scripts for manipulating colors in various ways.

color_mix(color1,color2)
Returns a 50/50 mixture of the two given colors.
color_multiply(color1,color2)
Returns the product of the two given colors.
color_scale(color,scale)
Returns a given color with each component scaled by a factor.
color_to_cmyk(color [, channel])
Returns a list data structure populated by CMYK values of a color, or optionally, the value of a specific color channel.
color_to_hex(color)
Returns a given color as a hexadecimal string in RRGGBB format.
color_to_wavelength(color)
Returns the approximate wavelength of a given color in nanometers.
hex_to_color(hex)
Returns an RGB color from a given hexadecimal color code.
hex_to_rgb(hex)
Returns a list data structure populated by RGB color component values.
make_color_random()
Returns a random color.
merge_color_squared(col1,col2,amount)
Returns a color merged from two colors by a given amount, where color components are squared for a more natural mix.
merge_colors(col1,col2,...,amount)
Returns a color merged from a series of two or more colors by a given amount.
rgb_to_cmyk(r,g,b [,channel])
Returns a list data structure populated by CMYK values of a color, or optionally, the value of a specific color channel.
rgb_to_hex(r,g,b)
Returns a given color as a hexadecimal string in RRGGBB format.
wavelength_to_hue(nano)
Returns the approximate HSV color hue [0..255] of a given wavelength.