CSS Color Systems: HEX, RGB, HSL & When to Use Each
A practical guide to CSS color formats for developers: HEX, RGB, HSL, oklch, custom properties, and modern color features.
Read more→Useful paid options if you need support, advanced features, or heavier workflows than the free tool covers.
Top pick
Best for: professional design with brand color palettes, templates, and AI-powered tools for any project
Professional design with brand color palettes, templates, and AI-powered tools for any project.
Try Canva Pro→Best value
Best for: design, prototype, and collaborate in real-time
Design, prototype, and collaborate in real-time. Color systems, design tokens, and team libraries.
Try Figma→Strong alternative
Best for: generate perfect color palettes in seconds
Generate perfect color palettes in seconds. Explore trends, extract from images, and export anywhere.
Try Coolors→We may earn a commission through affiliate links at no extra cost to you.
Recommendations are chosen for fit with the use case; not every recommendation depends on an affiliate relationship.
Our color picker lets you work with any color format used in web and graphic design. Convert colors between HEX, RGB, HSL, and CMYK instantly, generate harmonious color palettes based on color theory, check WCAG contrast ratios for accessibility, and copy ready-to-use CSS codes for your projects.
HEX uses hexadecimal notation (#FF5733), the most common format in CSS and web design. RGB defines colors with Red, Green, and Blue values (0-255), the native model for digital displays. HSL describes colors by Hue (0-360), Saturation, and Lightness (0-100%), a more intuitive model for color adjustments. CMYK is used in professional printing, defining colors with Cyan, Magenta, Yellow, and Key (black).
Generate harmonious color palettes automatically: complementary, analogous, triadic, and more. Each palette is based on color theory principles to ensure visually pleasing combinations. Ideal for designing interfaces, branding, and marketing materials.
WCAG 2.1 guidelines require a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text. Our tool automatically calculates these ratios and shows whether your color combination meets AA and AAA levels. Building accessible designs is not just good practice — it is a legal requirement in many countries.
Learn more with related in-depth guides and tutorials.
A practical guide to CSS color formats for developers: HEX, RGB, HSL, oklch, custom properties, and modern color features.
Read more→Master color theory for the web: learn about color models, accessibility, contrast ratios, palettes, and how to choose the perfect colors for your projects.
Read more→Click to pick
#6366F1
rgb(99, 102, 241)
hsl(239, 84%, 67%)
cmyk(59%, 58%, 0%, 5%)
#6366F1