Every colour space
Convert any notation — hex, rgb(), hsl(), hcl(), oklch(), cmyk() — to all of HEX, RGB, HSL, HCL, OKLCH and CMYK in one shot.
Convert between HEX, RGB, HSL, HCL, OKLCH and CMYK, generate tonal palettes, and browse Figma palettes — all offline in a single Rust CLI.
colors convert "#be185d"Input : #be185dHEX : #BE185DRGB : rgb(190, 24, 93)HSL : h=335.06°, s=77.57%, l=41.96%HCL : h=4.56°, c=64.91, l=41.84OKLCH : L=0.525, C=0.199, H=3.96°CMYK : C=0.0%, M=87.4%, Y=51.1%, K=25.5%Luminance: 0.124Paste any colour notation and get every space at once — plus palettes and named Figma colours.
Convert any notation — hex, rgb(), hsl(), hcl(), oklch(), cmyk() — to all of HEX, RGB, HSL, HCL, OKLCH and CMYK in one shot.
Generate mono, analogous, triadic or complementary ramps around any base colour, with a configurable step count.
Look up the closest named Figma colour for any hex, browse palette names, or dump every palette with its swatches.
Pick random colours for inspiration — optionally with a seed for reproducible output.
Every conversion reports relative luminance; --json adds WCAG contrast ratios against white and black.
--json emits machine-readable conversions and palettes for scripts, build tools and editors.
--swatch prints truecolour blocks next to every hex value — previews right in your terminal.
A single small Rust binary. Parsing, conversions and palette math are all in-process — nothing to install.
Real CLI output — conversions, palettes, Figma lookups and JSON.
colors convert "hsl(210, 50%, 40%)"Input : hsl(210, 50%, 40%)HEX : #336699RGB : rgb(51, 102, 153)HSL : h=210.00°, s=50.00%, l=40.00%HCL : h=269.74°, c=32.85, l=42.01OKLCH : L=0.499, C=0.099, H=250.43°CMYK : C=66.7%, M=33.3%, Y=0.0%, K=40.0%Luminance: 0.125colors palette "#be185d" -s analogous -n 5Palette (analogous) around #BE185D #360732 #8C1263 #E21D6F #ED7387 #F8CDC9colors figma hex "#be185d"Closest match: #CC2454 Rose Garnet Meadow (distance: 20.52)Palette: Rose Garnet Meadowcolors convert "#be185d" --json{ "cmyk": { "c": 0.0, "k": 25.49019607843137, "m": 87.36842105263159, "y": 51.05263157894736 }, "contrast_black": 3.48, "contrast_white": 6.04, ...}colors random 3 --seed 7#6304E6 rgb(99, 4, 230)#95733F rgb(149, 115, 63)#775322 rgb(119, 83, 34)colors figma palettesPalette: Amber Forest Twilight #735817 Amber Forest Twilight #FBAB04 Amber Forest Twilight 2 #A96C4F Amber Forest Twilight 3 ...One crate, one binary — no runtime dependencies beyond Cargo.
cargo install --git https://github.com/hieudoanm/colors colors-cli Installed package `colors-cli v0.0.1`colors convert "#be185d"HEX : #BE185DPrebuilt binaries for macOS, Windows and Linux are on the downloads page, or install straight from the release: curl -fsSL https://github.com/hieudoanm/colors/raw/master/scripts/install.sh | bash. Prefer source? Clone and build: git clone https://github.com/hieudoanm/colors && cd colors && cargo build --release — the binary lands in target/release/colors. See the README for details.