color
A color in a specific color space.
Typst supports:
- sRGB through the
rgb
function - Device CMYK through
cmyk
function - D65 Gray through the
luma
function
Furthermore, Typst provides the following built-in colors:
black
, gray
, silver
, white
, navy
, blue
, aqua
, teal
, eastern
,
purple
, fuchsia
, maroon
, red
, orange
, yellow
, olive
, green
, and
lime
.
MethodsMethods are functions that are available on values of a type. They can be called for a value using the .
operator.
Methods are functions that are available on values of a type. They can be called for a value using the
.
operator.lighten
method
Lightens a color.
value.lighten()
amount
The factor to lighten the color by.
darken
method
Darkens a color.
value.darken()
amount
The factor to darken the color by.
negate
method
Produces the negative of the color.
value.negate()