Palettes / Colors / #040CA8
#040CA8 — Vivid Blue
#040CA8 is a blue color we call Vivid Blue, closest to the named color DarkBlue (#00008B). It belongs to the blue family.
Color name
Closest CSS keyword: darkblue (#00008B) — not an exact match. CSS darkblue gives you #00008B, a different color; use #040CA8 when you need this exact shade.
Sources: common names follow widely used color-name references; CSS keywords and their hex values follow the CSS Color specification.
#040CA8 is a cool blue color associated with trust, calm and professionalism. It is saturated enough to be the accent — buttons, highlights and calls to action — while neutrals do the quiet work around it.
Its strongest partner is its complement #A9A104; it also sits naturally between #045FA9 and #4E04A9. In the palettes below you can see it working alongside real color combinations from our collection.
Color values
| HEX | #040CA8 |
|---|---|
| RGB | 4, 12, 168 |
| HSL | 237°, 95%, 34% |
| HSV | 237°, 98%, 66% |
| CMYK | 98%, 93%, 0%, 34% |
| XYZ | 7.25, 3.12, 37.27 |
| Yxy | 3.12, 0.1522, 0.0654 |
| CIE-Lab | 20.50, 54.71, -76.96 |
| Hunter Lab | 17.65, 44.05, -118.15 |
RGB & CMYK percentages
Red 2% · Green 5% · Blue 66%
Cyan 98% · Magenta 93% · Yellow 0% · Key 34%
CMYK values are unprofiled approximations for screen reference — not a print-proofing guarantee.
Previews
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
CSS code for #040CA8
.text { color: #040CA8; }
.background { background-color: #040CA8; }
.border { border: 3px solid #040CA8; }
.text-rgb { color: rgb(4, 12, 168); }
.text-hsl { color: hsl(237, 95%, 34%); }
.text-shadow-hex { text-shadow: 4px 4px 2px #040CA8; }
.text-shadow-rgba { text-shadow: 4px 4px 2px rgba(4, 12, 168, 0.8); }
.box-shadow-hex { box-shadow: 1px 1px 3px 2px #040CA8; }
.box-shadow-rgba { box-shadow: 1px 1px 3px 2px rgba(4, 12, 168, 0.8); }
HTML: <p style="color:#040CA8">Text here</p> · <div style="background-color:#040CA8">Div content here</div>
Shades of #040CA8
Tints of #040CA8
Tones of #040CA8
Color harmonies
Complementary — #A9A104:
Analogous:
Triadic:
Contrast & accessibility
| Against white text | 12.94:1 AAA |
|---|---|
| Against black text | 1.62:1 Fails |
Best text color on #040CA8: #FFFFFF.
Semi-transparent (opacity) text on #040CA8
Text set with opacity blends into the background, so its real contrast is lower than the solid ratios above. Choose a text color and an opacity to see the blended color and its true ratio:
Smaller body text shows the effect best.
Blended color: · Contrast against #040CA8: ·
How #040CA8 looks with color blindness
Simulated with standard Machado color-vision-deficiency matrices — useful when this color carries meaning in charts, maps or interfaces:
Closest design-system colors
The nearest matches in the Tailwind CSS, Material Design and Bootstrap palettes — handy when you need a framework class instead of a raw hex:
Palettes with a similar color
These palettes use a close neighbour of #040CA8 rather than the exact color:
Similar colors
The closest colors that actually appear in our palette collection — click any to open its page:
Browse neighbouring colors
Frequently asked questions
What color is #040CA8?
#040CA8 is Vivid Blue, a blue color (RGB 4, 12, 168). Its closest standard named color is DarkBlue.
What is the RGB and HSL of #040CA8?
#040CA8 is RGB 4, 12, 168 — HSL 237°, 95%, 34% — CMYK 98%, 93%, 0%, 34%.
What colors go with #040CA8?
Its complement is #A9A104; analogous partners are #045FA9 and #4E04A9. It also appears in 6+ palettes in our collection.
Can I use #040CA8 for text?
White text on #040CA8 has a contrast ratio of 12.94:1 (passes WCAG AA); black text gives 1.62:1.