Color Converter & CSS Generator

Real-time color space converter between HEX, RGB, HSL, and modern OKLCH. Features live WCAG AA/AAA contrast analysis, color harmony swatches, and CSS gradient & box-shadow generators.
#38BDF8
Click swatch to pick color
Alpha / Opacity: 100%
HEX
RGB
RGBA
HSL
OKLCH
CSS Var
WCAG 2.1 Accessibility Contrast Checker
Sample text on White
Ratio: 1.8:1
AA Fail AAA Fail
Sample text on Dark
Ratio: 11.5:1
AA Pass AAA Pass
Color Harmonies (Click to Apply)
Complementary:
Analogous:
Monochromatic Shades:
background: linear-gradient(90deg, #38bdf8 0%, #a78bfa 100%);
box-shadow: 0px 10px 25px -5px rgba(56, 189, 248, 0.4);

Verify You're Human

Understanding Digital Color Spaces & Web Accessibility

Color representation on computer screens is fundamentally an additive process where varying intensities of red, green, and blue phosphor subpixels blend together. However, how we mathematically express those intensities dramatically alters our ability to build harmonious palettes, maintain WCAG contrast compliance, and manipulate gradients without muddy grey dead-zones.

Color Models Compared: HEX vs RGB vs HSL vs OKLCH

WCAG 2.1 Color Contrast Standards

The Web Content Accessibility Guidelines (WCAG) specify minimum relative luminance contrast ratios between foreground text and background colors:

Frequently Asked Questions

Can I use OKLCH colors in production CSS today?
Yes. OKLCH is supported across all major evergreen browsers (Chrome 111+, Safari 15.4+, Firefox 113+, Edge 111+), representing over 93% of global web users.
Why do CSS gradients sometimes look washed out in the middle?
Standard sRGB linear gradients interpolate linearly along RGB coordinates, which frequently dips into desaturated muddy greys. Using OKLCH interpolation (linear-gradient(in oklch 90deg, #38bdf8, #a78bfa)) preserves vibrant saturation throughout the transition.

We use cookies to run this site. Analytics cookies are optional and only load if you accept. See our Privacy Policy.