Pick colors and get HEX, RGB, and HSL values
When working with colors in web design and development, you'll encounter three main formats: HEX, RGB, and HSL. Each color format has specific use cases and advantages.
The most common format for web colors. A HEX color code consists of 6 characters representing Red-Green-Blue values in hexadecimal (base-16) notation. For example, #FF5733 breaks down to FF (red), 57 (green), and 33 (blue).
An additive color model that mixes light. Used by all digital screens. The format is rgb(255, 87, 51) where each value ranges from 0-255.
More intuitive for humans, based on the color wheel. Format: hsl(12, 100%, 60%)
Our color picker tool instantly converts between all formats. Here are common color conversions:
| Color | HEX | RGB | HSL |
|---|---|---|---|
| 🔴 Red | #FF0000 | rgb(255, 0, 0) | hsl(0, 100%, 50%) |
| 🟢 Green | #00FF00 | rgb(0, 255, 0) | hsl(120, 100%, 50%) |
| 🔵 Blue | #0000FF | rgb(0, 0, 255) | hsl(240, 100%, 50%) |
| ⚫ Black | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
| ⚪ White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
Understanding color relationships helps create visually appealing designs:
Opposite on the color wheel (180° apart). Creates high contrast and vibrant combinations: Red + Cyan, Blue + Orange, Yellow + Purple.
Adjacent on the color wheel (30° apart). Creates harmonious, pleasing combinations: Red + Orange + Yellow, Blue + Blue-green + Green.
Equally spaced on the wheel (120° apart). Balanced and vibrant: Red + Blue + Yellow, Orange + Purple + Green.
Same color data, different notation. HEX uses hexadecimal (base-16), RGB uses decimal (base-10). #FF0000 = rgb(255, 0, 0). Both represent the same red color.
HEX: Simple and widely supported. RGB/RGBA: When you need transparency. HSL/HSLA: When you need to adjust lightness/saturation dynamically.
Screens have different color gamuts (range of colors they can display) and calibrations. Use sRGB for web design as it's the most common standard.
Check contrast ratios between text and background. WCAG guidelines recommend at least 4.5:1 for normal text and 3:1 for large text. Always test with accessibility tools.