Skip to contents

Main color functions

color() colour()
Turn vector of colors to color vector
is_color()
Test if object is a colors object

Saturation

clr_saturate()
Make a color more saturated
clr_desaturate()
Make a color more desaturated

Lightness

clr_lighten()
Make a color lighter
clr_darken()
Make a color darker

Greyscale

clr_grayscale() clr_greyscale()
Transform colors to grayscale

Negation

clr_negate()
Negate colors in RGB space

Mixing

clr_mix()
Mix color into color(s)

Rotate in RGB

clr_rotate()
Rotate the colors around the hue wheel

Tranparency

clr_alpha()
Set alpha in color

Modify HCL

modify_hcl()
Modify individual HCL axes

Color blindness approximations

clr_protan() clr_deutan() clr_tritan()
Simulate color vision deficiency
check_color_blindness()
Visualize color vision deficiency

Color Contrast

best_contrast()
Find highest contrast color
contrast_ratio()
Contrast ratio between colors

Extract Components