Color Converter
Enter a color above to see it in HEX, RGB, HSL, HWB, OKLCH, CMYK, and its CSS name.
Color Converter reads a single color in any common format and shows it in all the others at once. Paste a hex, rgb, hsl, hwb, oklch, or a CSS color name, and the tool auto detects the format, then gives you a live swatch, an alpha control, and a copy button for every output. Everything runs in your browser, so your colors never leave your machine.
How to use
- Paste or type a color in any format: hex, rgb, hsl, hwb, oklch, or a CSS name.
- The tool detects the format and converts it into every other format at once.
- Use the alpha slider to set transparency, or press Shuffle for a random color.
- Check the light and dark text samples to judge readability on the color.
- Click Copy next to any value to put it on your clipboard.
Examples
- HEX #3b82f6 becomes rgb(59, 130, 246), hsl(217, 91%, 60%), and oklch(62.4% 0.18 259).
- The name dodgerblue resolves to #1e90ff, rgb(30, 144, 255), and its other formats.
- An eight digit hex #3b82f680 carries 50 percent alpha through to rgba() and hsla().
FAQs
- Which color formats are supported?
- Input accepts hex (3, 6, or 8 digits), rgb, rgba, hsl, hsla, hwb, oklch, and CSS color names. Output covers all of those plus a CMYK approximation, and a CSS name when the color matches one exactly.
- Do I have to pick the input format?
- No. The tool detects the format from what you paste, so a single field handles every input. It shows you which format it read.
- How is alpha (transparency) handled?
- Alpha from an 8 digit hex, an rgba(), or an hsla() value is carried through. You can also set it with the alpha slider, and it appears in the rgba, hsla, hwb, oklch, and 8 digit hex outputs.
- Is the CMYK value accurate for printing?
- It is a simple screen based approximation, useful as a starting point. True print CMYK depends on the color profile, ink, and paper, so use your print workflow's profile for final work.
- Is my color data sent anywhere?
- No. All detection and conversion happen locally in your browser. Nothing is uploaded or stored.
Related tools
- Color Contrast CheckerCheck the WCAG contrast ratio between two hex colors and see if they pass AA and AAA for normal and large text.
- CSS Gradient GeneratorBuild linear, radial, and conic CSS gradients with a live preview. Adjust angle, stops, and colors, then copy the background rule.
- CSS MinifierMinify CSS online. Strip comments and whitespace, collapse spaces, and shrink stylesheets while keeping strings and url() values intact.
- HTML MinifierMinify HTML in your browser. Remove comments and collapse whitespace while keeping pre, textarea, script, and style content intact.
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.