Extracts the alpha value from a color.
[c1 c2 mode]
Blends two color values together based on the blending mode given specified with the mode keyword. Available blend modes are: :blend - linear interpolation of colours: C = A*factor + B :add - additive blending with white clip: C = min(A*factor + B, 255) :subtract - subtractive blending with black clip: C = max(B - A*factor, 0) :darkest - only the darkest colour succeeds: C = min(A*factor, B) :lightest - only the lightest colour succeeds: C = max(A*factor, B) :difference - subtract colors from underlying image. :exclusion - similar to :difference, but less extreme. :multiply - Multiply the colors, result will always be darker. :screen - Opposite multiply, uses inverse values of the colors. :overlay - A mix of :multiply and :screen. Multiplies dark values and screens light values. :hard-light - :screen when greater than 50% gray, :multiply when lower. :soft-light - Mix of :darkest and :lightest. Works like :overlay, but not as harsh. :dodge - Lightens light tones and increases contrast, ignores darks. Called "Color Dodge" in Illustrator and Photoshop. :burn - Darker areas are applied, increasing contrast, ignores lights. Called "Color Burn" in Illustrator and Photoshop.
Extracts the blue value from a color, scaled to match current color-mode. Returns a float.
Extracts the brightness value from a color. Returns a float.
[r g b]
[r g b a]
Creates an integer representation of a color The parameters are interpreted as RGB or HSB values depending on the current color-mode. The default mode is RGB values from 0 to 255 and therefore, the function call (color 255 204 0) will return a bright yellow. Args are cast to floats. r - red or hue value g - green or saturation value b - blue or brightness value a - alpha value
[mode max-x max-y max-z max-a]
[mode max-x max-y max-z]
Changes the way Processing interprets color data. Available modes are :rgb and :hsb.By default, the parameters for fill, stroke, background, and color are defined by values between 0 and 255 using the :rgb color model. The color-mode fn is used to change the numerical range used for specifying colors and to switch color systems. For example, calling (color-mode :rgb 1.0) will specify that values are specified between 0 and 1. The limits for defining colors are altered by setting the parameters range1, range2, range3, and range 4.
Return the current fill color.
Return the current stroke color.
Extracts the green value from a color, scaled to match current color-mode. This value is always returned as a float so be careful not to assign it to an int value.
Extracts the hue value from a color.
[c1 c2 amt]
Calculates a color or colors between two color at a specific increment. The amt parameter is the amount to interpolate between the two values where 0.0 equal to the first point, 0.1 is very near the first point, 0.5 is half-way in between, etc.
Extracts the red value from a color, scaled to match current color-mode.
Extracts the saturation value from a color.