Hex to OKLCH
The conversion behind modern CSS colour. Gamma decoding, a matrix multiply, and a cube root — not something to estimate.
#3b82f6
A light, moderately saturated violet. Closest CSS name: `dodgerblue`.
- 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 name
- dodgerblue
Readable text
White text
3.68:1
Black text
5.71:1
Use black text. Passes AA for normal text: yes · AAA: no · AA for large text: yes
Worth knowing
Worth knowing
8 derived colours are outside sRGB
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.
Worth knowing
A mid-tone: neither white nor black text reaches AAA
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.
Note
CMYK here is a naive conversion
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.
Complementary — the opposite hue
complementary
#c17400
clipped to sRGB
Analogous — neighbouring hues
analogous −30°
#0097e1
clipped to sRGB
analogous +30°
#886cee
Triadic — evenly spaced
triadic +120°
#e24956
triadic +240°
#3ba01b
Split-complementary — softer opposites
split-complementary +150°
#db5a00
clipped to sRGB
split-complementary +210°
#908e00
clipped to sRGB
Monochromatic — one hue, five lightnesses
lightness 0.25
#000079
clipped to sRGB
lightness 0.4
#003baa
clipped to sRGB
lightness 0.55
#246bdd
lightness 0.7
#539bff
clipped to sRGB
lightness 0.85
#81ccff
clipped to sRGB
Try your own colour
Paste one on the home page — you can also pick a colour straight out of a photo there. This page is available as markdown.