#0400A2

A color in the Violet family

#0400a2 is a color in the Violet family: RGB(4, 0, 162), HSL(241°, 100%, 32%), CMYK(98%, 100%, 0%, 36%). Closest named color: darkblue. Contrast is 13.75:1 on white and 1.53:1 on black. See shades, harmonies and color-blindness simulation.

Open in Picker Generate Scheme

Color Codes

HEX#0400a2
RGBrgb(4 0 162)
RGB (legacy)rgb(4, 0, 162)
RGB %rgb(2% 0% 64%)
HSLhsl(241 100% 32%)
HSV / HSBhsv(241, 100%, 64%)
HWBhwb(241 0% 36%)
CMYKcmyk(98%, 100%, 0%, 36%)
CIELAB (D50)lab(16.59 48.71 -79.57)
LCHlch(16.59 93.29 301.47)
OKLaboklab(0.323 -0.0202 -0.2213)
OKLCHoklch(0.323 0.2222 264.78)
Decimal262306

Properties

Color ToneViolet
Closest named colordarkblue ΔE 4.2
Closest web-safe color#000099
Hue241°
Saturation (HSL / HSV)100% / 100%
Lightness (HSL)32%
Brightness or Value (HSV)64%
Luminance (Rec.601 / Rec.709)8% / 5%
Relative luminance (WCAG)0.0263
Red / Green / Blue4 / 0 / 162

WCAG 2.2 Contrast Ratio

On White (#ffffff)
13.75:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.53:1
AA Normal (4.5:1) · FailAA Large (3:1) · FailAAA Normal (7:1) · Fail
Aa Bb 123

APCA Contrast Lc (reference) — As text on white / black: Lc 97.6 / 0 · As background with white / black text: Lc -101.1 / 0

Lightness Scale (OKLCH 50–950)

Eleven steps that change only perceived lightness while keeping hue and chroma — ready to use as design-system color tokens.

Tints (mixed with white)

Shades (mixed with black)

Color Harmonies

Color Vision Deficiency Simulation

Estimated appearance of this color for people with color vision deficiencies (Machado 2009).

Similar Named Colors

Use in CSS

:root {
  --color-brand: #0400a2;
  --color-brand-oklch: oklch(32.3% 0.2222 264.78);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(4 0 162 / 50%); }
/* Tailwind CSS */
<div class="bg-[#0400a2] text-[#0400a2] border-[#0400a2]">