- value
Colour input. For from = "hex" or from = "name", a
character vector. For numeric spaces (rgb, hsl, oklch, oklab), a
numeric vector of length 3, matrix/data frame with three columns, or a
list of such vectors.
- from
Source colour space. One of "hex", "rgb", "hsl", "oklab",
"oklch", or "name". If NULL (default), to_css() will infer "hex"
vs "name" for character inputs.
- to
Target CSS function. One of "oklch" (default), "oklab", "rgb",
"hsl", or "hex".
- alpha
Alpha channel as numbers in [0, 1]. Recycled to match the
number of colours.
- fallback
Behaviour when from = "name" (via
convert_colourspace()/name_to_hex()) or when generating names
elsewhere. TRUE (default) returns the closest named colour;
FALSE returns NA. Included for API consistency with
convert_colourspace().
- distance
Distance metric used for nearest-name fallback when
applicable. Included for API consistency with convert_colourspace().