HEX, RGB, HSL, OKLCH: Which Color Format Should You Use?
Why Color Formats Matter
A color is a color, right? On a screen it's three numbers — red, green, blue — and everything else is just bookkeeping. That's technically true and practically misleading. The format you pick determines how easy it is to:
A [color converter](/color-converter) gets you from any format to any other, but knowing **which to use** matters more than knowing how to convert.
HEX: The Universal Currency
`#ff6b35` is six hex digits packing three RGB values. It's the shortest readable form, every tool understands it, and Slack, Figma, GitHub and email clients all paste it as a color preview. **Use HEX when** you're sharing a single color value with a human or pasting into a tool with no DSL — Slack messages, design comments, copy in tickets.
What HEX is bad at: making changes. Want a slightly darker version of `#ff6b35`? Good luck eyeballing it. The math is opaque.
RGB: HEX with More Words
`rgb(255, 107, 53)` says exactly the same thing as `#ff6b35`, more verbosely. RGB is useful when you need **alpha** (`rgba(255, 107, 53, 0.5)`) and slightly easier to read at a glance for non-designers because the numbers are decimal. Modern CSS lets you write `rgb(255 107 53 / 50%)` with space separators, which is the canonical Color 4 form.
**Use RGB when** you need transparency or when you're algorithmically generating colors from RGB channel math.
HSL: The Designer's Format
`hsl(16, 100%, 60%)` decomposes the color into **hue** (the wheel position, 0-360°), **saturation** (0% = gray, 100% = pure color) and **lightness** (0% = black, 50% = full color, 100% = white). The magic is that you can change one component without disturbing the others:
**Use HSL when** you're building a design system, defining theme tokens, or want to generate hover/active/disabled states algorithmically. Most modern Tailwind themes are written in HSL CSS variables for exactly this reason.
HSL's weakness: it's **not perceptually uniform**. `hsl(60, 100%, 50%)` (yellow) and `hsl(240, 100%, 50%)` (blue) have the same "lightness" mathematically but look wildly different to the human eye — yellow feels much brighter. This makes HSL bad for generating evenly-spaced color scales.
OKLCH: The Future
`oklch(70% 0.16 35)` is the same color, expressed in **OKLab cylinder coordinates** — a color space designed in 2020 by Björn Ottosson to be perceptually uniform. Equal numerical changes in lightness or chroma produce equal perceived changes. This means:
**Use OKLCH when** you're building modern design systems, generating accessible color palettes programmatically, or anywhere you need the "lightness" number to actually mean what your eyes see. Tailwind v4, Radix Colors, and most 2025-era design tools use OKLCH as the source of truth.
Browser support landed in all evergreens in 2023, so it's safe to ship in production today.
HSV (a.k.a. HSB): The Image-Editing Format
HSV is HSL's sibling: same hue, same saturation, but the third component is **value** (brightness) instead of lightness. Photoshop, Affinity Photo, Procreate and most image editors expose HSV because it matches how artists think about color — pick a hue, pick how vivid, pick how bright.
**Use HSV when** you're working in image editors or talking to designers who came up through Photoshop. For the web, prefer HSL or OKLCH.
CMYK: The Print Format
Subtractive color for ink on paper. The numbers our converter shows are mathematical conversions — your actual print shop will re-map them to their specific color profile (SWOP, Fogra, or a custom calibration). **Use CMYK only when** preparing files for print, and always trust your printer's profile over our generic conversion.
Worth knowing: many screen-vivid colors (neon greens, electric magentas, deep blacks) cannot be reproduced in CMYK at all — they fall outside the printable gamut. Plan brand palettes with this in mind if they need to live in both worlds.
The Practical Recipe
For most web projects today:
Our [color converter](/color-converter) does all six conversions simultaneously plus the WCAG check, so you can move between formats as your stack and your team require — without juggling six different tools.
Conclusion
Color formats are interchangeable mathematically but not practically. HEX is for sharing. RGB is for transparency and code-level manipulation. HSL is for design systems with manual tweaks. OKLCH is for design systems that generate scales algorithmically. HSV is for image editors. CMYK is for print. Pick the right form for the right job, convert when you need to, and always verify contrast. Our tool lives in your browser, runs the standard math, and stays out of your way.