Skip to content
Vectorlight.net

#040f8e

Codes, contrast, shades, harmonies and SVG snippets for this color.

HEX
#040f8e
RGB
4, 15, 142
HSL
235.22°, 94.52%, 28.63%
OKLCH
0.31 0.19 265.09
Names
—
Lists

Codes

FormatValue
HEX#040f8e
RGBrgb(4 15 142)
HSLhsl(235.22 94.52% 28.63%)
OKLCHoklch(0.31 0.19 265.09)
CMYKcmyk(97.18% 89.44% 0% 44.31%)
Android#ff040f8e

Names & lists

Web-safe: No

Tailwind: No

Contrast

Aa
14.34:1
Pass AA normal text
Pass AA large text
On white #ffffff
Aa
1.46:1
Fail AA normal text
Fail AA large text
On black #000000 · Best text #ffffff

Open in contrast checker

Shades & tints

OKLCH lightness, mixed toward white then black.

Open in shades & tints

Harmonies

Complementary

Analogous

Triadic

Open in palette generator

Color-blindness

Normal
Protanopia
Deuteranopia
Tritanopia

Open simulator

SVG snippets

fill
fill="#040f8e"
Gradient stop
<stop stop-color="#040f8e"/>
CSS variable + fill
:root { --c: #040f8e; }
svg .icon { fill: var(--c); }

Recolor an SVG with this color

CSS

color / background
color: #040f8e;
background-color: #040f8e;
bg-[#040f8e]