# Hex to OKLCH

**A light, moderately saturated violet. Closest CSS name: `dodgerblue`.**

## Formats

| Format | Value |
| --- | --- |
| Hex | `#3b82f6` |
| RGB | `rgb(59 130 246)` |
| HSL | `hsl(217.2 91.2% 59.8%)` |
| OKLCH | `oklch(0.623 0.188 259.8)` |
| CMYK | `cmyk(76.02% 47.15% 0% 3.53%)` |
| Nearest CSS name | `dodgerblue` |

## Harmonies

Hue rotated in OKLCH, so perceived lightness is held constant.

- **Complementary:** `#c17400` (complementary, clipped)
- **Analogous:** `#0097e1` (analogous −30°, clipped), `#886cee` (analogous +30°)
- **Triadic:** `#e24956` (triadic +120°), `#3ba01b` (triadic +240°)
- **Split-complementary:** `#db5a00` (split-complementary +150°, clipped), `#908e00` (split-complementary +210°, clipped)
- **Monochromatic:** `#000079` (lightness 0.25, clipped), `#003baa` (lightness 0.4, clipped), `#246bdd` (lightness 0.55), `#539bff` (lightness 0.7, clipped), `#81ccff` (lightness 0.85, clipped)

## Contrast

- Against white text: 3.68:1
- Against black text: 5.71:1
- Use **black** text
- WCAG: AA normal pass, AAA normal fail, AA large pass

## Worth knowing

### 8 derived colours are outside sRGB (caution)

Rotating hue at this chroma produces colours a normal screen cannot display, so they have been clipped to the nearest sRGB colour. The hex values shown are therefore not exactly what the maths asked for, and the harmony will look slightly less even than it should.

**Fix:** Lower the chroma of the input colour before deriving harmonies, or accept the clipped values as an approximation.

### A mid-tone: neither white nor black text reaches AAA (caution)

The best this colour manages is 5.71:1 — against black text. That clears WCAG AA for normal text (4.5:1) but not AAA (7:1). Mid-tones look fine in a mockup and then fail review, because both text colours are only just adequate.

**Fix:** Use black text on it, and move the lightness further from the middle if the text has to meet AAA.

### CMYK here is a naive conversion (info)

CMYK has no fixed meaning without an output profile — the same numbers print differently on different presses and papers. The value shown is the standard arithmetic conversion, not a colour-managed one.

**Fix:** For print work, convert in software with the press profile applied.

---

Canonical URL: https://color-companion.gumballtools.com/color/hex-to-oklch
JSON API: `GET https://color-companion.gumballtools.com/api/v1/analyse?color=...`
MCP endpoint: `https://color-companion.gumballtools.com/api/mcp`
