Expand description
Color palette generation functions โ rainbow(), heat.colors(),
terrain.colors(), topo.colors(), cm.colors(), gray.colors(),
hsv(), hcl(), and colorRampPalette().
Staticsยง
- __
BUILTIN_ ๐REG_ BUILTIN_ CM_ COLORS - __
BUILTIN_ ๐REG_ BUILTIN_ COLOR_ RAMP_ INTERP - __
BUILTIN_ ๐REG_ BUILTIN_ GRAY_ COLORS - __
BUILTIN_ ๐REG_ BUILTIN_ GREY - __
BUILTIN_ ๐REG_ BUILTIN_ HCL - __
BUILTIN_ ๐REG_ BUILTIN_ HEAT_ COLORS - __
BUILTIN_ ๐REG_ BUILTIN_ HSV - __
BUILTIN_ ๐REG_ BUILTIN_ RAINBOW - __
BUILTIN_ ๐REG_ BUILTIN_ TERRAIN_ COLORS - __
BUILTIN_ ๐REG_ BUILTIN_ TOPO_ COLORS - __
INTERP_ ๐REG_ INTERP_ COLOR_ RAMP_ PALETTE
Functionsยง
- builtin_
cm_ ๐colors - Generate a cyan-magenta diverging color palette.
- builtin_
color_ ๐ramp_ interp - Internal helper: interpolate between a vector of hex colors to produce n colors.
- builtin_
gray_ ๐colors - Generate a gray-scale color palette.
- builtin_
grey ๐ - Convert grey levels to hex color strings.
- builtin_
hcl ๐ - Convert HCL (Hue-Chroma-Luminance) color values to hex color strings.
- builtin_
heat_ ๐colors - Generate a heat map color palette (red through yellow to white).
- builtin_
hsv ๐ - Convert HSV color values to hex color strings.
- builtin_
rainbow ๐ - Generate a rainbow color palette using HSV color space.
- builtin_
terrain_ ๐colors - Generate a terrain color palette (green through yellow/brown to white).
- builtin_
topo_ ๐colors - Generate a topographic color palette (blue through green to yellow).
- double_
scalar ๐ - Extract a scalar f64 from an RValue, returning a default if NULL or missing.
- extract_
doubles ๐ - Extract a vector of doubles from named/positional arg, defaulting to a single-element vector.
- extract_
n ๐ - Extract n (first positional arg, required) as a non-negative integer.
- hcl_
to_ ๐rgb - Convert HCL (Hue in degrees, Chroma, Luminance) to RGB (each in [0,1]). Uses the CIE LCH -> Lab -> XYZ -> sRGB pipeline.
- hsv_
to_ ๐rgb - Convert HSV (h in [0,1], s in [0,1], v in [0,1]) to RGB (each in [0,1]).
- interp_
color_ ๐ramp_ palette - Create a color interpolation function from a vector of colors.
- parse_
hex_ ๐color - Parse a hex color string like โ#RRGGBBโ or โ#RRGGBBAAโ into (r, g, b, a) with values in [0,1].
- rgb_
to_ ๐hex - Format (r, g, b, a) each in [0,1] as a hex color string. If alpha is 1.0, returns โ#RRGGBBโ; otherwise โ#RRGGBBAAโ.