HEX ↔ RGB Color Converter
Convert colors between HEX, RGB, HSL, and HSV formats instantly. Includes color picker and common web colors reference.
Common Colors
Color Formats
HEX
#1A73E8
RGB
rgb(26, 115, 232)
HSL
hsl(214, 82%, 51%)
HSV / HSB
hsv(214, 89%, 91%)
CSS (rgb)
background-color: rgb(26, 115, 232);
CSS (hex)
background-color: #1A73E8;
RGB Channels
Red26 / 255 (10%)
Green115 / 255 (45%)
Blue232 / 255 (91%)
How to Use HEX ↔ RGB Color Converter
- 1Enter a HEX color code or pick a color from the color wheel.
- 2RGB, HSL, and HSV equivalents are shown instantly.
- 3Click any format to copy it to your clipboard.
Zenovay
Privacy-first analytics for your website
Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.
Related Tools
JSON Formatter & ValidatorFormat, validate, and beautify JSON data with syntax highlighting and error detection.
JWT DecoderDecode and inspect JWT tokens. View header, payload, and verify signatures.
Base64 Encode/DecodeEncode text to Base64 or decode Base64 back to text. Supports UTF-8 and binary data.
URL Encode/DecodeEncode or decode URL components. Handle special characters, query strings, and full URLs.
Frequently Asked Questions
How do I convert HEX to RGB?▾
HEX colors are 3 pairs of hexadecimal digits representing Red, Green, Blue channels. #RRGGBB. Each pair is a base-16 number (0–FF = 0–255 in decimal). Conversion: split hex into pairs, convert each from base 16 to base 10. Example: #1A2B3C → R=0x1A=26, G=0x2B=43, B=0x3C=60 → rgb(26, 43, 60). Short hex #RGB: each digit is doubled. #F3A → #FF33AA → rgb(255, 51, 170). CSS accepts both forms: #FF33AA and #F3A are identical. Programmatically: parseInt("1A", 16) = 26.
What is HSL color format?▾
HSL stands for Hue, Saturation, Lightness — a more intuitive color model than RGB. Hue: 0–360 degrees on a color wheel. 0/360=red, 60=yellow, 120=green, 180=cyan, 240=blue, 300=magenta. Saturation: 0–100%. 0% = gray, 100% = fully saturated (vivid color). Lightness: 0–100%. 0% = black, 100% = white, 50% = pure color. CSS: hsl(240, 100%, 50%) = pure blue. Advantage over RGB: you can intuitively create variations — to lighten a color, increase lightness. To make a pastel, reduce saturation. To rotate hue, add/subtract degrees. Used in design systems for generating color palettes.
What is HSV/HSB color format?▾
HSV (Hue, Saturation, Value) is also called HSB (Hue, Saturation, Brightness). Similar to HSL but different: Value/Brightness: 0=black, 100%=fully bright (pure color or white depending on saturation). HSV vs HSL: In HSL, 100% lightness is always white regardless of saturation. In HSV, 100% value with 0% saturation is white, with 100% saturation is the pure hue. HSV is the model used by most color pickers in design tools (Photoshop, Figma, etc.). It's more natural for selecting colors: pick the hue, then choose saturation and brightness on a 2D square.
How does opacity/alpha work in CSS colors?▾
Alpha adds transparency to colors. Range: 0 (fully transparent) to 1 (fully opaque). CSS formats with alpha: rgba(255, 100, 50, 0.5) — 50% transparent. hsla(120, 60%, 50%, 0.8) — 20% transparent. Hex with alpha: #RRGGBBAA (8-digit hex). #FF000080 = red at ~50% opacity (0x80 = 128 = 128/255 ≈ 0.5). Short: #RGBA (4-digit). #FF08 = red at ~53% opacity. Modern CSS: color(display-p3 1 0 0 / 0.5) for wide-gamut. The opacity CSS property vs alpha: opacity affects the entire element and its children; alpha color affects only that specific property. opacity: 0.5 on a div with text makes both background and text transparent; background-color: rgba(0,0,0,0.5) only affects the background.
What are CSS named colors and when to use them?▾
CSS has 140+ named colors. Well-known: red, blue, green, white, black, gray, orange, purple, pink, cyan. Some with fun names: rebeccapurple (#663399, added in honor of CSS spec author Eric Meyer's daughter), cornflowerblue (#6495ED), papayawhip (#FFEFD5), lawngreen (#7CFC00). When to use: Named colors are fine for quick prototyping. For production: use HEX or HSL for consistency and tooling compatibility. HSL is best for design systems — you can generate palette variants programmatically: hsl(210, 80%, 20%/30%/40%/50%/60%) for a blue scale. Avoid named colors in design tokens as they hide the actual values.