#331FB3#331FB3

#331FB3 is a dark, highly saturated blue. Relative luminance 0.049; OKLCH L 39.0% C 0.213 H 276.1°. Best body text is #FFFFFF at 10.57:1 contrast (WCAG AA passes).

Color values

HEX#331FB3
RGBrgb(51, 31, 179)
HSLhsl(248, 70%, 41%)
HSVhsv(248, 83%, 70%)
CMYKcmyk(71.5%, 82.7%, 0%, 29.8%)
CIE-LABlab(26.56, 52.53, -73.44)
CIE-LCHlch(26.56, 90.29, 305.57°)
OKLaboklab(39.04% 0.0226 -0.2122)
OKLCHoklch(39.04% 0.213 276.1)
XYZxyz(9.9892, 4.9375, 43.0657)
Luminance0.0494 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331FB3 #9FB31F
analogous
#1F55B3 #331FB3 #7D1FB3
triadic
#331FB3 #B3331F #1FB333
tetradic
#331FB3 #B31F55 #9FB31F #1FB37D
square
#331FB3 #B31F55 #9FB31F #1FB37D
split-complementary
#331FB3 #B37D1F #55B31F
monochromatic
#150D4B #24167F #331FB3 #4A33DC #7968E5

Accessibility & contrast

On white

10.57
#331FB3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#331FB3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331FB3
10.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331FB3#FFFFFF#000000##FFFFFF
##331FB31.0010.571.9910.57
#FFFFFF10.571.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045B7
Deuteranopia (green-blind)
#0038B1
Tritanopia (blue-blind)
#004E6B
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #331fb3;
/* rgb */ color: rgb(51, 31, 179);
/* oklch */ color: oklch(39.0% 0.213 276.1);
Tailwind
colors: {
  custom: {
    50: '#7f60cb',
    500: '#331fb3',
    950: '#000000',
  },
}
SCSS
$custom: #331fb3;
$custom-light: #7f60cb;
$custom-dark: #000000;
JSON
{
  "hex": "#331fb3",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 179
  },
  "hsl": {
    "h": 248.108,
    "s": 70.476,
    "l": 41.176
  },
  "oklch": {
    "l": 0.3904,
    "c": 0.21345,
    "h": 276.1
  },
  "luminance": 0.04938
}

Semantic roles & 50–950 ramp

primary
#331FB3
secondary
#BCCA64
accent
#ED3BD5
background
#F8F5FC
surface
#F0EAF9
border
#CBC6D2
text
#0C0513
muted
#7D7982

Preview Lab

Preview with #331FB3

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

Preview Lab → · Contrast checker → · Palette generator →

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