RGB to HEX Color Converter
Adjust the red, green, and blue channels using sliders or by typing values (0–255). The HEX and HSL equivalents update in real time.
#3b82f6rgb(59, 130, 246)hsl(217, 91%, 60%)Red
59
23%
Green
130
51%
Blue
246
96%
How RGB works
RGB is an additive color model. Each channel (Red, Green, Blue) has a value from 0 to 255. Mixing all three at maximum gives white (rgb(255,255,255)), all at zero gives black (rgb(0,0,0)).
Converting RGB to HEX
Each RGB channel is converted to a two-digit hexadecimal number, then concatenated with a # prefix. For example: rgb(59, 130, 246) → 3B + 82 + F6 → #3B82F6.
Quick reference
| Color | R | G | B | HEX |
|---|---|---|---|---|
| Red | 255 | 0 | 0 | #ff0000 |
| Lime | 0 | 255 | 0 | #00ff00 |
| Blue | 0 | 0 | 255 | #0000ff |
| Yellow | 255 | 255 | 0 | #ffff00 |
| Cyan | 0 | 255 | 255 | #00ffff |
| Magenta | 255 | 0 | 255 | #ff00ff |
Related Tools
Color Contrast Checker — WCAG AA & AAA Compliance
Check WCAG 2.1 color contrast ratio for AA and AAA compliance. Live text preview.
Color Mixer & Gradient Generator
Blend two colors together with a ratio slider. Get a full gradient palette.
CSS Color Names — All 148 Named Colors
Browse all 148 CSS named colors with their HEX and RGB values.
Material Design Color Chart & Palette
Material Design color palette — 19 hue families × 10 shades each.
Minecraft Color Codes & Formatting
All Minecraft §-prefixed color and formatting codes with previews.
Roblox Color Codes & BrickColor IDs
Complete Roblox BrickColor palette with color IDs and RGB values.
Color Palette Generator
Generate harmonious color palettes from a base color using complementary, triadic, and analogous schemes.
Color Format Converter
Convert colors between HEX, RGB, HSL, HSV, CMYK, and CSS named color formats instantly.
Color Shades Generator
Generate a 10-step shade palette (50–900) from any base color using HSL lightness scaling — just like Tailwind CSS.
Color Gradient Palette Generator
Generate smooth RGB gradients between two colors with 3–20 steps. Copy HEX swatches, CSS linear-gradient, or a Tailwind array.
Color Contrast Analyzer
Check WCAG 2.1 contrast ratios for any color pair. Pass/fail for AA and AAA levels — plus automatic suggestions and live text preview.
Color Blindness Simulator
Upload any image to see how it appears with Protanopia, Deuteranopia, Tritanopia, and Achromatopsia.
Online Color Picker — HEX, RGB & HSL
Pick any color visually with a canvas-based HSV picker. Export as HEX, RGB, or HSL.
Color Wheel Online — Interactive HSL Color Picker
Interactive HSL color wheel. Click any point to pick its hue and saturation.
Image Color Picker — Sample Colors from Photos
Upload any image and click to sample colors directly from pixels.
HEX to RGB Color Converter
Convert HEX color codes to RGB, HSL, HSV, and CMYK values instantly.