#331FA4#331FA4

#331FA4 is a dark, vivid blue. Relative luminance 0.044; OKLCH L 37.4% C 0.196 H 277.9°. Best body text is #FFFFFF at 11.21:1 contrast (WCAG AA passes).

Color values

HEX#331FA4
RGBrgb(51, 31, 164)
HSLhsl(249, 68%, 38%)
HSVhsv(249, 81%, 64%)
CMYKcmyk(68.9%, 81.1%, 0%, 35.7%)
CIE-LABlab(24.84, 48.04, -67.25)
CIE-LCHlch(24.84, 82.65, 305.54°)
OKLaboklab(37.35% 0.027 -0.1943)
OKLCHoklch(37.35% 0.196 277.9)
XYZxyz(8.5539, 4.3634, 35.5062)
Luminance0.0436 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331FA4 #90A41F
analogous
#1F4DA4 #331FA4 #761FA4
triadic
#331FA4 #A4331F #1FA433
tetradic
#331FA4 #A41F4D #90A41F #1FA476
square
#331FA4 #A41F4D #90A41F #1FA476
split-complementary
#331FA4 #A4761F #4DA41F
monochromatic
#130C3D #231571 #331FA4 #442AD7 #715DE0

Accessibility & contrast

On white

11.21
#331FA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#331FA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331FA4
11.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331FA4#FFFFFF#000000##FFFFFF
##331FA41.0011.211.8711.21
#FFFFFF11.211.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0040A8
Deuteranopia (green-blind)
#0035A2
Tritanopia (blue-blind)
#004862
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #331fa4;
/* rgb */ color: rgb(51, 31, 164);
/* oklch */ color: oklch(37.4% 0.196 277.9);
Tailwind
colors: {
  custom: {
    50: '#7c5fc0',
    500: '#331fa4',
    950: '#000000',
  },
}
SCSS
$custom: #331fa4;
$custom-light: #7c5fc0;
$custom-dark: #000000;
JSON
{
  "hex": "#331fa4",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 164
  },
  "hsl": {
    "h": 249.023,
    "s": 68.205,
    "l": 38.235
  },
  "oklch": {
    "l": 0.37351,
    "c": 0.19614,
    "h": 277.9
  },
  "luminance": 0.04364
}

Semantic roles & 50–950 ramp

primary
#331FA4
secondary
#B5C55A
accent
#EB3DD1
background
#F8F5FC
surface
#EFE9F8
border
#CAC5D1
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #331FA4

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#331FA4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva