#331A58#331A58

#331A58 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 29.0% C 0.106 H 297.9°. Best body text is #FFFFFF at 14.69:1 contrast (WCAG AA passes).

Color values

HEX#331A58
RGBrgb(51, 26, 88)
HSLhsl(264, 54%, 22%)
HSVhsv(264, 70%, 35%)
CMYKcmyk(42%, 70.5%, 0%, 65.5%)
CIE-LABlab(16.24, 27.31, -33.00)
CIE-LCHlch(16.24, 42.83, 309.61°)
OKLaboklab(28.98% 0.0499 -0.094)
OKLCHoklch(28.98% 0.106 297.9)
XYZxyz(3.4956, 2.1471, 9.4609)
Luminance0.0215 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A58 #3F581A
analogous
#1A2058 #331A58 #521A58
triadic
#331A58 #58331A #1A5833
tetradic
#331A58 #581A20 #3F581A #1A5852
square
#331A58 #581A20 #3F581A #1A5852
split-complementary
#331A58 #58521A #20581A
monochromatic
#0E0718 #180C29 #331A58 #4E2887 #6A36B6

Accessibility & contrast

On white

14.69
#331A58 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331A58 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A58
14.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A58#FFFFFF#000000##FFFFFF
##331A581.0014.691.4314.69
#FFFFFF14.691.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285A
Deuteranopia (green-blind)
#002857
Tritanopia (blue-blind)
#2A2836
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331a58;
/* rgb */ color: rgb(51, 26, 88);
/* oklch */ color: oklch(29.0% 0.106 297.9);
Tailwind
colors: {
  custom: {
    50: '#6e5888',
    500: '#331a58',
    950: '#000000',
  },
}
SCSS
$custom: #331a58;
$custom-light: #6e5888;
$custom-dark: #000000;
JSON
{
  "hex": "#331a58",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 88
  },
  "hsl": {
    "h": 264.194,
    "s": 54.386,
    "l": 22.353
  },
  "oklch": {
    "l": 0.28981,
    "c": 0.10644,
    "h": 297.9
  },
  "luminance": 0.02147
}

Semantic roles & 50–950 ramp

primary
#331A58
secondary
#6E8E40
accent
#DE4AA2
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331A58

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

Preview Lab → · Contrast checker → · Palette generator →

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