Hex to RGB & CMYK Supported
Real-Time Color Matrix Zero Server Transmission

Hex Color to RGB, RGBA, HSL, HSV & CMYK Precision Converter

Convert HEX color codes into CSS rgb(), rgba() with opacity, hsl(), hsv(), and print-ready CMYK values with real-time contrast checking and WCAG compliance ratings.

Quick Samples:

Hex Color Input

Alpha Transparency
100%(1.00)
Live Channel Adjustment
Red (R)59
Green (G)130
Blue (B)246

Visual Swatch & Alpha Preview

#3B82F6
Solid: #3B82F6Alpha: 100%
Readable Contrast Preview
Best Text: Pure Black (#000000)
rgba(59, 130, 246, 1.00)
WCAG 2.1 Contrast RatiosAA Normal: ≥ 4.5:1
On White
3.68:1
AA FailAAA Fail
On Black
5.71:1
AA PassAAA Fail

Converted Color Formats

CSS RGBScreen
rgb(59, 130, 246)
CSS RGBA (Alpha)Web Transparent
rgba(59, 130, 246, 1.00)
CSS HSLHue/Sat/Light
hsl(217, 91%, 60%)
CSS HSLA (Alpha)HSL + Alpha
hsla(217, 91%, 60%, 1.00)
Print CMYKPrint Ready
cmyk(76%, 47%, 0%, 4%)
C: 76%M: 47%Y: 0%K: 4%
HSV / HSBFigma / Sketch
hsv(217, 76%, 96%)
H: 217°S: 76%V: 96%
HEX (6 & 8-digit)Web Standard
#3B82F6|#3B82F6FF
CSS Color 4Modern Syntax
rgb(59 130 246 / 100%)

Developer Code Snippets

:root {
  --brand-color: #3B82F6;
  --brand-color-rgb: 59, 130, 246;
  --brand-color-alpha: rgba(59, 130, 246, 1.00);
  --brand-color-hsl: hsl(217, 91%, 60%);
}

Color Harmonies & Palettes

Click any swatch to load
Tints (Lightened with White)
Shades (Darkened with Black)
Recent History:

100% Private Browser Execution

All data processing, parsing, and compilation execute strictly inside your local browser memory. Zero external server uploads.

Instant Live Preview

Instant real-time reactive computation delivers immediate feedback on every keystroke with zero network latency.

Production Standards & Compliance

Outputs clean, cross-browser CSS and visual values verified against modern web layout standards.

Formula & Reference Guide

Hex to RGB & Color Space Conversion Reference Guide

Mathematical conversion equations, alpha channel syntax, and WCAG contrast ratio calculations for HEX, RGB, HSL, and CMYK.

Hex to RGB & Color Space Conversion Reference Guide — Client-Side Calculation Flow & Methodology
Hex to RGB & Color Space Conversion Reference Guide — Client-Side Calculation Flow & Methodology
CSS Color Module Level 4

Standard Web Color Codes & Conversion Matrix Table

Standard CSS 16-color palette and common web UI colors, with exact 6-digit Hexadecimal, RGB decimal tuples, HSL values, and best UI practices.

Standard Web Color Codes & Conversion Matrix Table
Color NameHex CodeRGB DecimalHSL ValueBest Web UI Usage
Black#000000rgb(0, 0, 0)hsl(0, 0%, 0%)Deep dark backgrounds, high-contrast headings, terminal interfaces
White#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)Light theme canvas, inverted high-legibility dark mode typography
Pure Red#FF0000rgb(255, 0, 0)hsl(0, 100%, 50%)Destructive actions, error alerts, live broadcast indicator badges
Lime Green#00FF00rgb(0, 255, 0)hsl(120, 100%, 50%)System operational status, success pills, verified green checks
Pure Blue#0000FFrgb(0, 0, 255)hsl(240, 100%, 50%)Default browser hyperlink blue, information badges, interactive focus rings
Pure Yellow#FFFF00rgb(255, 255, 0)hsl(60, 100%, 50%)Warning banners, caution highlights, high-visibility search markers
Cyan / Aqua#00FFFFrgb(0, 255, 255)hsl(180, 100%, 50%)Tech accents, modern dark mode gradients, data visualization highlights
Magenta / Fuchsia#FF00FFrgb(255, 0, 255)hsl(300, 100%, 50%)Marketing callouts, creative portfolio branding, gradient stop points
Silver#C0C0C0rgb(192, 192, 192)hsl(0, 0%, 75%)Subtle borders, divider rules, disabled input borders in light theme
Gray#808080rgb(128, 128, 128)hsl(0, 0%, 50%)Secondary metadata text, placeholder text, neutral icon fills
Maroon#800000rgb(128, 0, 0)hsl(0, 100%, 25%)Severe security warning banners, enterprise alert headers
Navy Blue#000080rgb(0, 0, 128)hsl(240, 100%, 25%)Enterprise navbar backgrounds, financial UI primary button fills
Olive#808000rgb(128, 128, 0)hsl(60, 100%, 25%)Earthy theme palettes, subtle status chips, dark mode highlight accents
Purple#800080rgb(128, 0, 128)hsl(300, 100%, 25%)Visited hyperlink state, AI feature badges, premium tier badges
W3C CSS Color Module Level 4 standard named colors and sRGB color space conversion.

Key Parameters & Controls

Key Parameters & Controls
ParameterType / UnitDescriptionDefault
hexStringstring (#RRGGBB | #RRGGBBAA)Hexadecimal color code string with optional 8-digit alpha transparency.—
rgbChannels{ r: 0-255, g: 0-255, b: 0-255 }Base-10 integer RGB intensity channels.—
alphaChannelnumber (0.0 to 1.0)Opacity factor where 0 is completely transparent and 1 is fully opaque.—
cmykPercentages{ c: %, m: %, y: %, k: % }Subtractive color model percentages used in offset and digital print production.—

Pro Tips & Best Practices

Modern CSS supports 8-digit hex codes

Modern CSS supports 8-digit hex codes where the last two digits represent alpha transparency (e.g., #3B82F680 represents 50% opacity).

For digital text legibility, WCAG 2.1

For digital text legibility, WCAG 2.1 requires a minimum contrast ratio of 4.5:1 for normal body text and 3:1 for large headings (Level AA).

Converting RGB to CMYK

Converting RGB to CMYK is an approximation because computer screens (additive RGB) encompass a wider color gamut than physical printing inks (subtractive CMYK).

Common Gotchas & Troubleshooting

⚠️Invalid Hex Code error

Ensure the hex string begins with '#' and consists only of valid hexadecimal characters (0-9, A-F) in lengths of 3, 4, 6, or 8 characters.

⚠️Shorthand hex expansion disparity

3-digit hex codes expand by duplicating each character (#abc becomes #aabbcc, not #abc000).

Frequently Asked Questions

How do you convert a 6-digit hex code to RGB manually?▼

Split the code into three 2-digit pairs: RR, GG, BB. Convert each pair from hexadecimal (base 16) to decimal (base 10). Example: #FF8000 -> R=255, G=128, B=0.

How do you convert RGB to HSL?▼

Normalize RGB channels between 0 and 1. Find Max and Min values. Lightness = (Max + Min) / 2. Hue and Saturation are derived from color sector angles and chromatic difference.

What is the difference between RGB and CMYK?▼

RGB is an additive light model used for illuminated digital displays. CMYK is a subtractive ink model used for physical print publications.

Are color codes uploaded to external servers?▼

No. All color space conversions and math routines run 100% client-side in your web browser.