Skip to main content

colorMode

Description​

colorMode changes the way color data is interpreted. By default, the parameters for fill, stroke and background are defined by values between 0 and 255 using the RGB color model. This is equivalent to setting colorMode(RGB). Setting colorMode(HSB) lets you use the HSB system instead. You can also use HSL.

Syntax​

colorMode(mode)

Parameters​

ParameterDescription
modeeither RGB, HSB or HSL, corresponding to Red/Green/Blue and Hue/Saturation/Brightness (or Lightness)