Convert color values between HEX, RGB, HSL, HSV, and OKLCH formats instantly. Edit any field and all others update in real time. Copy CSS-ready values with one click — everything runs in your browser.
Modern CSS supports many color formats, each suited to different scenarios. HEX is the most widely used in web development and is supported everywhere. RGB maps directly to screen hardware. HSL is human-friendly — adjusting hue, saturation, and lightness is intuitive when designing palettes. OKLCH is the newest addition to CSS, offering perceptually uniform color manipulation and a much wider gamut for modern displays, making it the preferred format for design systems targeting P3 and HDR screens.
#rrggbb — most common format#rrggbbaa — includes alpha channel#rgb when digits repeat (#aabbcc → #abc)rgb(37 99 235) (space-separated)For most web projects today, HEX remains the safest default — it's universally supported, compact, and understood by every tool in the ecosystem. Use RGB or RGBA when you need to control opacity dynamically in CSS or JavaScript, or when constructing colors programmatically. HSL is the best choice for building design systems where you want to express lightness and saturation as readable numbers — it makes creating consistent color palettes and tints much more intuitive than HEX arithmetic.
If you are building a modern design system targeting up-to-date browsers (Chrome 111+, Firefox 113+, Safari 16.4+), OKLCH offers the most perceptually uniform model available in CSS. Unlike HSL, OKLCH ensures that two colors with the same lightness value actually appear equally light to the human eye, which is invaluable for accessible contrast ratios and harmonious palette generation. Regardless of which format you use in CSS, keeping a HEX reference in your design tokens is still recommended for compatibility with third-party tools and older environments.