Color Converter
Convert colors between HEX, RGB, HSL, CMYK, and related CSS notations. Preview swatches, copy values for design tokens, and translate picker output into code. Runs entirely in the tab so brand palettes never hit a third-party converter.
Runs in your browser. Nothing is uploaded.
About this tool
Convert HEX, RGB, HSL, and CMYK with a live swatch and a native color picker. Copy each CSS form independently or copy HEX from the sticky bar. Values clamp to valid ranges so a typo cannot produce NaN tokens in a stylesheet.
How to use: paste #rgb, #rrggbb, rgb(), hsl(), or cmyk(), or pick from the color input. Read the other representations instantly. Brand palettes never hit a third-party converter.
Example: #1a1a1a becomes rgb(26, 26, 26), an equivalent hsl(), and cmyk(). Use this when a design token is HEX but your CSS uses RGB, or print specs give CMYK. Clamped RGB channels stay in 0-255.
All math is in JavaScript on this page. After load, conversion works offline. Related: color contrast for WCAG ratios, CSS formatter if you are pasting a whole rule block. Alpha is not a separate mode here; stick to opaque colors.
Related Convert tools
JSON ↔ YAML
Convert JSON to YAML and YAML back to JSON in the browser. Paste a config, Kubernetes snippet, or API fixture and copy the other format. Parsing uses js-yaml locally. Documents are never posted to a converter.
JSON ↔ TOML
Convert JSON objects to TOML and TOML documents back to JSON in the browser. Handy for Cargo.toml, pyproject, and app config fragments. Parsing stays on-device.
JSON ↔ XML
Convert JSON objects to XML and XML documents back to JSON. Useful for SOAP leftovers, RSS, and mixed API stacks. XML is parsed with the browser DOMParser so payloads stay on the device.
JSON ↔ CSV
Turn an array of JSON objects into CSV, or parse CSV headers into JSON objects. Quote-aware parsing runs in the tab so spreadsheets of IDs and emails are not uploaded to a conversion service.
JSON to SQL
Turn a JSON object or array of objects into SQL INSERT statements. Set a table name, copy the query, and keep rows on the device instead of pasting fixtures into a hosted converter.
CSV ↔ TSV
Convert comma-separated values to tab-separated values and back, preserving quoted fields. A small delimiter swap for dumps you would rather not paste into a spreadsheet SaaS.