Convert HEX ↔ RGB Instantly
Free color converter with live preview. Supports HEX, RGB, HSL, and RGBA. No sign-up required.
R
G
B
Tools
Everything You Need for Color
HEX ↔ RGB Converter
Real-time bidirectional conversion between HEX, RGB, HSL, and RGBA. Type or paste any color value.
Palette Generator
Generate harmonious 5-color palettes using analogous, complementary, triadic, and split schemes.
Contrast Checker
Test foreground and background colors against WCAG AA and AAA accessibility guidelines.
CSS Named Colors
Browse all 140+ CSS named colors. Click any color to instantly load it in the converter.
Generate
Color Palette Generator
Click any swatch to copy its HEX value. Hit generate for a new harmonious palette.
Accessibility
WCAG Contrast Checker
Enter foreground and background HEX colors to check WCAG 2.1 compliance.
Sample Heading
This is what body text looks like at this contrast ratio.
Reference
CSS Named Colors
All 140+ CSS named colors. Click any color to load it in the converter above.
FAQ
Frequently Asked Questions
HEX (hexadecimal) is a 6-digit color code used in web design and CSS. It represents colors using base-16 values for red, green, and blue channels. For example, #FF0000 is pure red. HEX codes always start with a hash (#) symbol followed by exactly 6 characters (0-9 and A-F). Shorthand 3-digit hex codes like #F00 expand to their 6-digit equivalent.
Split the 6-digit hex code into 3 pairs (RR, GG, BB), then convert each pair from base-16 to base-10. For example, #FF8800 → R: FF = 255, G: 88 = 136, B: 00 = 0, giving rgb(255, 136, 0). Our converter does this instantly as you type, also outputting HSL and RGBA formats.
They represent the same colors in different formats. HEX uses a compact 6-character hexadecimal code (#RRGGBB), while RGB uses three decimal numbers from 0-255. HEX is commonly used in CSS and design tools, while RGB is standard in programming and image processing. Both produce identical visual results — it's purely a notation difference.
HSL stands for Hue, Saturation, and Lightness. Hue is the color angle on the color wheel (0-360°), saturation is the color intensity (0-100%), and lightness controls brightness (0-100%). HSL is often more intuitive for designers because adjusting lightness or saturation is straightforward, unlike HEX where changing brightness requires modifying all three channels.
WCAG (Web Content Accessibility Guidelines) defines minimum contrast ratios between text and background for readability. Level AA requires 4.5:1 for normal text and 3:1 for large text. Level AAA requires 7:1 for normal text and 4.5:1 for large text. Meeting these ensures your content is accessible to people with visual impairments. Use our contrast checker above to verify your color combinations.
Yes! Click the eyedropper icon next to the HEX input field to open your browser's native color picker. Pick any color and it will automatically populate both the HEX and RGB fields. You can also paste a HEX code directly, type RGB values manually, or click any color from the CSS Named Colors section below.