← Back to Directory

The Universal HEX to RGB & RGBA Converter, Color Harmonies Studio & WCAG Contrast Inspector is a high-precision, 24-bit / 32-bit in-browser colorimetry engine engineered for digital designers, frontend architects, and web accessibility specialists. Operating 100% client-side with zero external API dependencies or telemetry latency, the studio ingests 3, 4, 6, and 8-digit hexadecimal notations (#RGB, #RGBA, #RRGGBB, and #RRGGBBAA) with real-time sanitization and live bi-directional channel sliders.

Beyond basic conversion, the suite provides a multi-space color bridge translating values into standard CSS comma-separated rgba(), modern space-separated CSS Color Module Level 4 rgb(r g b / alpha) syntax, cylindrical HSL (hsl() / hsla()), HSV / HSB, subtractive CMYK for print proofs, and perceptual CIE L*a*b* (D65 illuminant). Its integrated W3C WCAG 2.1 Accessibility Radar computes gamma-corrected relative luminance ($Y$) and real-time contrast ratios against pure white and deep charcoal backgrounds, rendering pass/fail compliance badges for AA Normal (4.5:1), AA Large (3.0:1), and enhanced AAA (7.0:1) standards. With algorithmic harmony synthesis (Complementary, Split-Complementary, Analogous, Triadic, Tetradic, and Monochromatic tints/shades), 1-click multi-format clipboard exporters (CSS Variables, SCSS, Tailwind config, Swift UIColor, Android XML), a 1200×630 Canvas Dossier Card Generator, and seamless automatic synchronization with RiazHub’s site-wide night/dark mode, this utility serves as an indispensable digital color workstation.

RiazHub.com Digital Tools

Universal HEX to RGB / RGBA Studio

High-precision 24-bit / 32-bit in-browser colorimetry engine. Convert 3, 4, 6, and 8-digit HEX codes to CSS Level 4 rgb(), HSL, CMYK, and CIE LAB spaces, evaluate real-time W3C WCAG 2.1 contrast ratios, synthesize harmonic design palettes, and export 1200x630 specification dossier cards.

Standard RGB / RGBA
rgb(2, 132, 199)
R: 2 • G: 132 • B: 199
Modern CSS Level 4
rgb(2 132 199)
Clean Space-Separated Syntax
Relative Luminance (Y)
0.207
W3C Gamma-Corrected sRGB
WCAG Contrast on White
4.41 : 1
Passes AA Large • Fails AA Normal

HEX Color Ingestion

6 Chars
#
Accepts 3, 4, 6, or 8 digits (#RGB, #RGBA, #RRGGBB, #RRGGBBAA) 24-Bit Standard
Quick Brand & Web Palettes
R Red Channel
G Green Channel
B Blue Channel
A Alpha Opacity
#0284C7
rgb(2, 132, 199)
Lum: 0.207
100% Solid Opacity Split: 100% Solid | Alpha Checkboard
CSS Standard (Legacy)
rgb(2, 132, 199)
CSS Level 4 (Space)
rgb(2 132 199)
HSL Color Notation
hsl(200, 98%, 39%)
HSV / HSB Format
hsv(200, 99%, 78%)
Subtractive CMYK
cmyk(99%, 34%, 0%, 22%)
CIE L*a*b* (D65)
lab(52.6, -11.4, -42.8)
HEX 6-Digit (24-Bit)
#0284C7
HEX 8-Digit (32-Bit Alpha)
#0284C7FF
0–1 Normalized Float
0.008, 0.518, 0.780
CSS % Channels
rgb(0.8% 51.8% 78%)
Complementary & Split-Complementary 180° & ±150° Rotations
Analogous Harmony Palette Adjacent ±30° Neighbors
Triadic & Tetradic (Rectangle) Harmonies 120° & 90° Geometric Intervals
Monochromatic Shades & Tints Stepped Perceptual Lightness
On Pure White (#FFFFFF)
Sample Headline Text (18pt)

This live sample renders body copy using your active color over a white surface.

Contrast Ratio
4.41:1
AA: Pass AAA: Fail
On Deep Charcoal (#0F172A)
Sample Headline Text (18pt)

This live sample renders body copy using your active color over a dark UI surface.

Contrast Ratio
4.76:1
AA: Pass AAA: Fail
Standard Criteria Threshold Against White (#FFF) Against Black (#000)
WCAG AA Normal Text (<18pt / 24px) 4.50 : 1 Pass (4.41) Pass (4.76)
WCAG AA Large Text (≥18pt or 14pt bold) 3.00 : 1 Pass (4.41) Pass (4.76)
WCAG AAA Normal Text (Enhanced) 7.00 : 1 Fail (4.41) Fail (4.76)
WCAG AAA Large Text (Enhanced) 4.50 : 1 Fail (4.41) Pass (4.76)
CSS Root Custom Properties
:root {
  --color-primary-hex: #0284C7;
  --color-primary-rgb: 2, 132, 199;
  --color-primary: rgb(var(--color-primary-rgb));
  --color-primary-alpha: rgba(2, 132, 199, 1);
}
Tailwind CSS (tailwind.config.js)
module.exports = {
  theme: {
    extend: {
      colors: {
        'brand': {
          DEFAULT: '#0284C7',
          rgb: 'rgb(2, 132, 199)',
        }
      }
    }
  }
};
SCSS Variables
$color-brand-hex: #0284C7;
$color-brand-rgb: (2, 132, 199);
$color-brand: rgb(2, 132, 199);
Swift (iOS) & Android XML
// Swift (iOS UIColor)
let brandColor = UIColor(red: 2/255.0, green: 132/255.0, blue: 199/255.0, alpha: 1.0)

<!-- Android XML colors.xml -->
<color name="brand_primary">#FF0284C7</color>
1200×630 High-Resolution Color Specification Dossier
Ready for documentation, design system tokens, and social sharing
W3C Color Standard Insight: 8-digit HEX notation (#RRGGBBAA) dedicates its 4th byte to opacity (00 = 0% translucent, FF = 100% opaque). CSS Color Module Level 4 standardizes space syntax rgb(r g b / alpha) for uniform colorimetry across web rendering engines.

⚡ Real-World Preset Color Scenarios

Modern Web Brand Azure
HEX #0284C7 • rgb(2, 132, 199)
Translucent Modal Overlay
HEX #00000080 • rgba(0, 0, 0, 0.5)
High-Visibility Amber
HEX #F59E0B • rgb(245, 158, 11)
Deep UI Midnight
HEX #0F172A • WCAG AAA on White
Recent Session Colors

📚 Color Science, W3C Specifications & Accessibility Guide

Hexadecimal color codes use base-16 notation (0–9 and A–F) to represent 24-bit sRGB color channels. In a standard 6-digit code (such as #0284C7), the characters are grouped into three 8-bit pairs representing Red, Green, and Blue. Each channel ranges from 00 (decimal 0) to FF (decimal 255), allowing $256 \times 256 \times 256 = 16,777,216$ distinct possible colors. In shorthand 3-digit notation (e.g. #F09), each digit is doubled to yield #FF0099.
Defined in W3C CSS Color Module Level 4, 8-digit hexadecimal notation introduces a fourth byte pair dedicated to alpha transparency (#RRGGBBAA). For instance, #00000080 represents pure black with 50% opacity ($128/255 \approx 0.50$). Shorthand 4-digit notation (#RGBA) expands each digit symmetrically (e.g., #1238 becomes #11223388). Modern browser rendering engines parse 8-digit codes natively in CSS properties.
Human photopic vision is unequally sensitive across the electromagnetic spectrum: our green cone photoreceptors respond far more intensely than red or blue cones. To accurately model human vision, the W3C WCAG 2.1 algorithm linearizes gamma-compressed sRGB values and computes relative luminance using exact spectral coefficients:
Y = 0.2126 × R_linear + 0.7152 × G_linear + 0.0722 × B_linear
Green light accounts for 71.52% of perceived luminance, while blue accounts for only 7.22%. This is why pure blue (#0000FF) looks substantially darker to the human eye than pure green (#00FF00), despite both sharing a channel maximum of 255.
The Web Content Accessibility Guidelines (WCAG) 2.1 define contrast ratio as $(L_1 + 0.05) / (L_2 + 0.05)$, where $L_1$ is the relative luminance of the lighter color and $L_2$ is that of the darker color. The $0.05$ offset accounts for ambient flare on visual display terminals:
  • Level AA Normal Text: Contrast ratio of at least 4.5:1 for body typography under 18pt (24px) or 14pt (18.66px) bold.
  • Level AA Large Text: Minimum ratio of 3.0:1 for headlines and large text elements.
  • Level AAA Enhanced: Minimum ratio of 7.0:1 for normal text and 4.5:1 for large text to assist users with low visual acuity.
All color calculations, channel normalizations, CIELAB matrix conversions, harmonic angle shifts, and canvas graphic renderings execute entirely within your browser's local JavaScript execution context. Zero color inputs, hex strings, or telemetry data are ever transmitted across networks or saved on remote servers.
Copied to clipboard!
✨ CUSTOM ON-DEMAND CREATIONS

Have a Custom Demand? We Build Tools, Website Templates, PDF Books & Crochet Patterns

Need a custom web tool, specialized website theme or template, educational children's PDF book, bespoke crochet pattern design, or personalized digital utility? Founder MUHAMMAD RIAZ Khan Jee and the RiazHub team work directly to customer demand. Contact us with your project details and get tailored solutions delivered promptly.

⚡ Custom Web Tools 🎨 Website Templates & Themes 📚 Children's Printable PDF Books 🧶 Crochet Design Patterns 🛠️ Custom PDF & Digital Files
🌐 Visitor Statistics
0
Today
0
This Month
0
Previous Month
0
Total Visits