(accessible? color1 color2 & [level])
Check if two colors meet WCAG AA accessibility standards
Check if two colors meet WCAG AA accessibility standards
(adjust-hue color degrees)
Adjust the hue of a color by degrees
Adjust the hue of a color by degrees
(analogous color & [count angle])
Generate analogous colors
Generate analogous colors
(brightness color)
Calculate perceived brightness of a color (0-255)
Calculate perceived brightness of a color (0-255)
(clamp value min-val max-val)
Clamp a value between min and max
Clamp a value between min and max
(color-distance color1 color2)
Calculate Euclidean distance between two colors in RGB space
Calculate Euclidean distance between two colors in RGB space
(complementary color)
Get the complementary color
Get the complementary color
(contrast-ratio color1 color2)
Calculate contrast ratio between two colors
Calculate contrast ratio between two colors
(cool? color)
Check if a color is cool (blue/green/purple family)
Check if a color is cool (blue/green/purple family)
(darken color amount)
Darken a color by a percentage (0-1)
Darken a color by a percentage (0-1)
(desaturate color amount)
Decrease saturation of a color by a percentage (0-1)
Decrease saturation of a color by a percentage (0-1)
(find-accessible-color background target-color & [level])
Find an accessible color by adjusting lightness
Find an accessible color by adjusting lightness
(generate-palette strategy base-color & [options])
Generate a color palette using various strategies
Generate a color palette using various strategies
(grayscale color)
Convert a color to grayscale
Convert a color to grayscale
(hex->name hex)
Find closest color name for a hex color (approximate)
Find closest color name for a hex color (approximate)
(hex->rgb hex)
Convert hex color to RGB vector
Convert hex color to RGB vector
(hex->rgba hex & [alpha])
Convert hex color to RGBA vector with optional alpha
Convert hex color to RGBA vector with optional alpha
(lighten color amount)
Lighten a color by a percentage (0-1)
Lighten a color by a percentage (0-1)
(luminance color)
Calculate relative luminance of a color
Calculate relative luminance of a color
(mix color1 color2 & [ratio])
Mix two colors with optional ratio (0-1, default 0.5)
Mix two colors with optional ratio (0-1, default 0.5)
(monochromatic color & [count])
Generate monochromatic palette by varying lightness and saturation
Generate monochromatic palette by varying lightness and saturation
(muted? color & [threshold])
Check if a color is muted (low saturation)
Check if a color is muted (low saturation)
(name->hex color-name)
Convert color name to hex
Convert color name to hex
(normalize-hex hex)
Normalize hex color to 6 characters with #
Normalize hex color to 6 characters with #
(rgb->hex rgb)
Convert RGB vector to hex string
Convert RGB vector to hex string
(rgba->hex rgba)
Convert RGBA vector to hex string (ignoring alpha)
Convert RGBA vector to hex string (ignoring alpha)
(round n & [decimals])
Round a number to specified decimal places
Round a number to specified decimal places
(saturate color amount)
Increase saturation of a color by a percentage (0-1)
Increase saturation of a color by a percentage (0-1)
(similar? color1 color2 & [threshold])
Check if two colors are similar within a threshold
Check if two colors are similar within a threshold
(split-complementary color & [angle])
Get split-complementary colors
Get split-complementary colors
(temperature color)
Get color temperature as a keyword
Get color temperature as a keyword
(tetradic color)
Get tetradic colors (three colors that form a square on the color wheel)
Get tetradic colors (three colors that form a square on the color wheel)
(triadic color)
Get triadic colors (two colors that form a triangle on the color wheel)
Get triadic colors (two colors that form a triangle on the color wheel)
(valid-hex? hex)
Check if string is a valid hex color
Check if string is a valid hex color
(valid-hsl? hsl)
Check if vector is a valid HSL color
Check if vector is a valid HSL color
(valid-rgb? rgb)
Check if vector is a valid RGB color
Check if vector is a valid RGB color
(valid-rgba? rgba)
Check if vector is a valid RGBA color
Check if vector is a valid RGBA color
(vibrant? color & [threshold])
Check if a color is vibrant (high saturation)
Check if a color is vibrant (high saturation)
(warm? color)
Check if a color is warm (red/orange/yellow family)
Check if a color is warm (red/orange/yellow family)
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |