#331895#331895

#331895 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.9% C 0.184 H 280.9°. Best body text is #FFFFFF at 12.31:1 contrast (WCAG AA passes).

Color values

HEX#331895
RGBrgb(51, 24, 149)
HSLhsl(253, 72%, 34%)
HSVhsv(253, 84%, 58%)
CMYKcmyk(65.8%, 83.9%, 0%, 41.6%)
CIE-LABlab(22.04, 46.76, -62.70)
CIE-LCHlch(22.04, 78.22, 306.72°)
OKLaboklab(34.92% 0.035 -0.1809)
OKLCHoklch(34.92% 0.184 280.9)
XYZxyz(7.1150, 3.5264, 28.7337)
Luminance0.0353 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331895 #7A9518
analogous
#183C95 #331895 #721895
triadic
#331895 #953318 #189533
tetradic
#331895 #95183C #7A9518 #189572
square
#331895 #95183C #7A9518 #189572
split-complementary
#331895 #957218 #3C9518
monochromatic
#0F072C #211060 #331895 #4520CA #6846E1

Accessibility & contrast

On white

12.31
#331895 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#331895 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331895
12.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331895#FFFFFF#000000##FFFFFF
##3318951.0012.311.7112.31
#FFFFFF12.311.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003998
Deuteranopia (green-blind)
#003093
Tritanopia (blue-blind)
#003F58
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331895;
/* rgb */ color: rgb(51, 24, 149);
/* oklch */ color: oklch(34.9% 0.184 280.9);
Tailwind
colors: {
  custom: {
    50: '#795bb5',
    500: '#331895',
    950: '#000000',
  },
}
SCSS
$custom: #331895;
$custom-light: #795bb5;
$custom-dark: #000000;
JSON
{
  "hex": "#331895",
  "rgb": {
    "r": 51,
    "g": 24,
    "b": 149
  },
  "hsl": {
    "h": 252.96,
    "s": 72.254,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34917,
    "c": 0.18429,
    "h": 280.9
  },
  "luminance": 0.03527
}

Semantic roles & 50–950 ramp

primary
#331895
secondary
#A8C246
accent
#EF39C8
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331895

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

Preview Lab → · Contrast checker → · Palette generator →

#331895 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva