#331E4E

A color in the Violet family

#331e4e is a color in the Violet family: RGB(51, 30, 78), HSL(266°, 44%, 21%), CMYK(35%, 62%, 0%, 69%). Closest named color: midnightblue. Contrast is 14.62:1 on white and 1.44:1 on black. See shades, harmonies and color-blindness simulation.

Color Codes

HEX#331e4e
RGBrgb(51 30 78)
RGB (legacy)rgb(51, 30, 78)
RGB %rgb(20% 12% 31%)
HSLhsl(266 44% 21%)
HSV / HSBhsv(266, 62%, 31%)
HWBhwb(266 12% 69%)
CMYKcmyk(35%, 62%, 0%, 69%)
CIELAB (D50)lab(16.15 19.26 -26.21)
LCHlch(16.15 32.53 306.31)
OKLaboklab(0.2886 0.0448 -0.0733)
OKLCHoklch(0.2886 0.0859 301.41)
Decimal3350094

Properties

Color ToneViolet
Closest named colormidnightblue ΔE 8
Closest web-safe color#333366
Hue266°
Saturation (HSL / HSV)44% / 62%
Lightness (HSL)21%
Brightness or Value (HSV)31%
Luminance (Rec.601 / Rec.709)16% / 15%
Relative luminance (WCAG)0.0218
Red / Green / Blue51 / 30 / 78

WCAG 2.2 Contrast Ratio

On White (#ffffff)
14.62:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.44: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 101.2 / 0 · As background with white / black text: Lc -104.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: #331e4e;
  --color-brand-oklch: oklch(28.86% 0.0859 301.41);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(51 30 78 / 50%); }
/* Tailwind CSS */
<div class="bg-[#331e4e] text-[#331e4e] border-[#331e4e]">