๐ŸŽจ

Color Code Converter

Convert between HEX, RGB, HSL, and CMYK color formats

Accepts HEX (#3B82F6), RGB (rgb(59, 130, 246)), HSL (hsl(217, 91%, 60%)), or color names (blue)

#3B82F6
HEX
#3B82F6
RGB
rgb(59, 130, 246)
HSL
hsl(217, 91%, 60%)
CMYK
cmyk(76%, 47%, 0%, 4%)
CSS Variable
--color-primary: #3B82F6;

Color Analysis

Brightness
60%
Saturation
91%
Hue
217ยฐ
Key (Black)
4%
White Text
Sample text
Black Text
Sample text

Color Code Converter: Convert Between Color Formats

Our color code converter instantly translates colors between HEX, RGB, HSL, and CMYK formats. Perfect for web developers, designers, and anyone working with colors across different applications. Simply enter a color in any format and get all conversions instantly.

The tool accepts HEX codes (#3B82F6), RGB values (rgb(59, 130, 246)), HSL values (hsl(217, 91%, 60%)), and even CSS color names (blue, coral, etc.). Use the color picker for visual selection.

Understanding Color Formats

HEX: Hexadecimal notation using 6 characters (0-9, A-F) representing red, green, and blue. Common in web development. Example: #3B82F6
RGB: Red, Green, Blue values from 0-255. Used in digital screens. Example: rgb(59, 130, 246)
HSL: Hue (0-360ยฐ), Saturation (0-100%), Lightness (0-100%). Intuitive for color adjustments. Example: hsl(217, 91%, 60%)
CMYK: Cyan, Magenta, Yellow, Key (black) percentages. Standard for print. Example: cmyk(76%, 47%, 0%, 4%)

When to Use Each Format

Web/CSS: HEX or RGBโ€”most common for websites. HSL is great when you need to adjust brightness or saturation programmatically.
Design software: RGB for screen work, CMYK for print projects.
Color manipulation: HSL makes it easy to create color variations by adjusting hue, saturation, or lightness independently.

FAQ

Why do print colors look different from screen?

Screens use additive RGB (light-based), while print uses subtractive CMYK (ink-based). Some RGB colors cannot be reproduced in CMYK, especially vibrant blues and greens.

What's the difference between 3-digit and 6-digit HEX?

3-digit HEX (#F00) is shorthand where each digit is doubled (#FF0000). Not all colors can be represented in 3 digitsโ€”only when each pair has identical characters.

How do I choose accessible color combinations?

Ensure sufficient contrast between text and background. WCAG recommends a contrast ratio of at least 4.5:1 for normal text. Use lighter backgrounds with dark text or vice versa.