color extension
This API inherits the color type from the DeltaScript base language
and extends it in the ways described below.
Properties
These definitions use the arbitrary color object C as the caller.
Hue (hue)
C.hue -> float
Returns the hue of a color C as a float ranging from 0.0 to 1.0. Since hue is a circular/angular property, a hue of 0.0 and a hue of 1.0 are identical. A hue of 0.0 is conventionally assigned to red (#ff0000
, for example), while green is assigned to 1/3 (120°) and blue is assigned to 2/3 (240°).
Read more:
Saturation (sat)
C.sat -> float
Returns the saturation
of a color C as a float ranging from 0.0 to 1.0.
Value (val)
C.val -> float
Returns the value
of a color C as a float ranging from 0.0 to 1.0.