#331FA8#331FA8

#331FA8 is a dark, highly saturated blue. Relative luminance 0.045; OKLCH L 37.8% C 0.201 H 277.4°. Best body text is #FFFFFF at 11.04:1 contrast (WCAG AA passes).

Color values

HEX#331FA8
RGBrgb(51, 31, 168)
HSLhsl(249, 69%, 39%)
HSVhsv(249, 82%, 66%)
CMYKcmyk(69.6%, 81.5%, 0%, 34.1%)
CIE-LABlab(25.29, 49.25, -68.92)
CIE-LCHlch(25.29, 84.71, 305.55°)
OKLaboklab(37.8% 0.0258 -0.1991)
OKLCHoklch(37.8% 0.201 277.4)
XYZxyz(8.9208, 4.5101, 37.4386)
Luminance0.0451 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331FA8 #94A81F
analogous
#1F50A8 #331FA8 #781FA8
triadic
#331FA8 #A8331F #1FA833
tetradic
#331FA8 #A81F50 #94A81F #1FA878
square
#331FA8 #A81F50 #94A81F #1FA878
split-complementary
#331FA8 #A8781F #50A81F
monochromatic
#140C41 #231574 #331FA8 #452CD8 #7360E2

Accessibility & contrast

On white

11.04
#331FA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#331FA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331FA8
11.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331FA8#FFFFFF#000000##FFFFFF
##331FA81.0011.041.9011.04
#FFFFFF11.041.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0041AC
Deuteranopia (green-blind)
#0036A6
Tritanopia (blue-blind)
#004A64
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #331fa8;
/* rgb */ color: rgb(51, 31, 168);
/* oklch */ color: oklch(37.8% 0.201 277.4);
Tailwind
colors: {
  custom: {
    50: '#7d5fc3',
    500: '#331fa8',
    950: '#000000',
  },
}
SCSS
$custom: #331fa8;
$custom-light: #7d5fc3;
$custom-dark: #000000;
JSON
{
  "hex": "#331fa8",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 168
  },
  "hsl": {
    "h": 248.759,
    "s": 68.844,
    "l": 39.02
  },
  "oklch": {
    "l": 0.37797,
    "c": 0.20081,
    "h": 277.4
  },
  "luminance": 0.04511
}

Semantic roles & 50–950 ramp

primary
#331FA8
secondary
#B7C65D
accent
#EC3CD2
background
#F8F5FC
surface
#EFEAF8
border
#CAC6D1
text
#0B0513
muted
#7C7982

Preview Lab

Preview with #331FA8

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

Preview Lab → · Contrast checker → · Palette generator →

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