#331AB4#331AB4

#331AB4 is a dark, highly saturated blue. Relative luminance 0.047; OKLCH L 38.7% C 0.218 H 276.3°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#331AB4
RGBrgb(51, 26, 180)
HSLhsl(250, 75%, 40%)
HSVhsv(250, 86%, 71%)
CMYKcmyk(71.7%, 85.6%, 0%, 29.4%)
CIE-LABlab(25.97, 54.90, -75.00)
CIE-LCHlch(25.97, 92.95, 306.20°)
OKLaboklab(38.67% 0.0239 -0.2167)
OKLCHoklch(38.67% 0.218 276.3)
XYZxyz(9.9702, 4.7369, 43.5601)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331AB4 #9BB41A
analogous
#1A4EB4 #331AB4 #801AB4
triadic
#331AB4 #B4331A #1AB433
tetradic
#331AB4 #B41A4E #9BB41A #1AB480
square
#331AB4 #B41A4E #9BB41A #1AB480
split-complementary
#331AB4 #B4801A #4EB41A
monochromatic
#150B49 #24127F #331AB4 #482BE0 #7660E8

Accessibility & contrast

On white

10.78
#331AB4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#331AB4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331AB4
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331AB4#FFFFFF#000000##FFFFFF
##331AB41.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044B8
Deuteranopia (green-blind)
#0037B1
Tritanopia (blue-blind)
#004D6B
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #331ab4;
/* rgb */ color: rgb(51, 26, 180);
/* oklch */ color: oklch(38.7% 0.218 276.3);
Tailwind
colors: {
  custom: {
    50: '#805ecc',
    500: '#331ab4',
    950: '#000000',
  },
}
SCSS
$custom: #331ab4;
$custom-light: #805ecc;
$custom-dark: #000000;
JSON
{
  "hex": "#331ab4",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 180
  },
  "hsl": {
    "h": 249.74,
    "s": 74.757,
    "l": 40.392
  },
  "oklch": {
    "l": 0.38673,
    "c": 0.21802,
    "h": 276.3
  },
  "luminance": 0.04738
}

Semantic roles & 50–950 ramp

primary
#331AB4
secondary
#BACC5D
accent
#F136D3
background
#F8F5FC
surface
#F0E9F9
border
#CBC5D2
text
#0C0514
muted
#7D7982

Preview Lab

Preview with #331AB4

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

Preview Lab → · Contrast checker → · Palette generator →

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