#331B68#331B68

#331B68 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.6% C 0.126 H 291.4°. Best body text is #FFFFFF at 14.02:1 contrast (WCAG AA passes).

Color values

HEX#331B68
RGBrgb(51, 27, 104)
HSLhsl(259, 59%, 26%)
HSVhsv(259, 74%, 41%)
CMYKcmyk(51%, 74%, 0%, 59.2%)
CIE-LABlab(17.86, 31.59, -40.98)
CIE-LCHlch(17.86, 51.74, 307.63°)
OKLaboklab(30.58% 0.046 -0.1175)
OKLCHoklch(30.58% 0.126 291.4)
XYZxyz(4.2552, 2.4870, 13.3499)
Luminance0.0249 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B68 #50681B
analogous
#1B2968 #331B68 #591B68
triadic
#331B68 #68331B #1B6833
tetradic
#331B68 #681B29 #50681B #1B6859
square
#331B68 #681B29 #50681B #1B6859
split-complementary
#331B68 #68591B #29681B
monochromatic
#0C0618 #1B0E37 #331B68 #4B2899 #6334C9

Accessibility & contrast

On white

14.02
#331B68 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#331B68 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B68
14.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B68#FFFFFF#000000##FFFFFF
##331B681.0014.021.5014.02
#FFFFFF14.021.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D6A
Deuteranopia (green-blind)
#002A66
Tritanopia (blue-blind)
#222F3F
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331b68;
/* rgb */ color: rgb(51, 27, 104);
/* oklch */ color: oklch(30.6% 0.126 291.4);
Tailwind
colors: {
  custom: {
    50: '#715994',
    500: '#331b68',
    950: '#000000',
  },
}
SCSS
$custom: #331b68;
$custom-light: #715994;
$custom-dark: #000000;
JSON
{
  "hex": "#331b68",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 104
  },
  "hsl": {
    "h": 258.701,
    "s": 58.779,
    "l": 25.686
  },
  "oklch": {
    "l": 0.30579,
    "c": 0.1262,
    "h": 291.4
  },
  "luminance": 0.02487
}

Semantic roles & 50–950 ramp

primary
#331B68
secondary
#819D42
accent
#E246B1
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331B68

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

Preview Lab → · Contrast checker → · Palette generator →

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