alpha

blend-color

blue

brightness

color

color-mode

current-fill

current-stroke

green

hue

lerp-color

red

saturation

alpha

Arguments
[color]
Docstring
Extracts the alpha value from a color.
Works only inside sketch functions?
Yes
Original Processing method
alpha()

blend-color

Arguments
[c1 c2 mode]
Docstring
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.
Works only inside sketch functions?
No
Original Processing method
blendColor()

blue

Arguments
[color]
Docstring
Extracts the blue value from a color, scaled to match current color-mode.
Returns a float.
Works only inside sketch functions?
Yes
Original Processing method
blue()

brightness

Arguments
[color]
Docstring
Extracts the brightness value from a color. Returns a float.
Works only inside sketch functions?
Yes
Original Processing method
brightness()

color

Arguments
[gray][r g b][r g b a][gray alpha]
Docstring
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
Works only inside sketch functions?
Yes
Original Processing method
color()

color-mode

Arguments
[mode max][mode][mode max-x max-y max-z max-a][mode max-x max-y max-z]
Docstring
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.
Works only inside sketch functions?
Yes
Original Processing method
colorMode()

current-fill

Arguments
[]
Docstring
Return the current fill color.
Works only inside sketch functions?
Yes
Original Processing method
PGraphics.fillColor

current-stroke

Arguments
[]
Docstring
Return the current stroke color.
Works only inside sketch functions?
Yes
Original Processing method
PGraphics.strokeColor

green

Arguments
[col]
Docstring
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.
Works only inside sketch functions?
Yes
Original Processing method
green()

hue

Arguments
[col]
Docstring
Extracts the hue value from a color.
Works only inside sketch functions?
Yes
Original Processing method
hue()

lerp-color

Arguments
[c1 c2 amt]
Docstring
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.
Works only inside sketch functions?
Yes
Original Processing method
lerpColor()

red

Arguments
[c]
Docstring
Extracts the red value from a color, scaled to match current color-mode.
Works only inside sketch functions?
Yes
Original Processing method
red()

saturation

Arguments
[c]
Docstring
Extracts the saturation value from a color.
Works only inside sketch functions?
Yes
Original Processing method
saturation()