#331258#331258

#331258 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.8% C 0.118 H 300.2°. Best body text is #FFFFFF at 15.35:1 contrast (WCAG AA passes).

Color values

HEX#331258
RGBrgb(51, 18, 88)
HSLhsl(268, 66%, 21%)
HSVhsv(268, 80%, 35%)
CMYKcmyk(42%, 79.5%, 0%, 65.5%)
CIE-LABlab(14.63, 31.79, -35.61)
CIE-LCHlch(14.63, 47.74, 311.75°)
OKLaboklab(27.83% 0.0592 -0.1017)
OKLCHoklch(27.83% 0.118 300.2)
XYZxyz(3.3426, 1.8410, 9.4099)
Luminance0.0184 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331258 #375812
analogous
#121458 #331258 #561258
triadic
#331258 #583312 #125833
tetradic
#331258 #581214 #375812 #125856
square
#331258 #581214 #375812 #125856
split-complementary
#331258 #585612 #145812
monochromatic
#0F0519 #160825 #331258 #501C8B #6E27BE

Accessibility & contrast

On white

15.35
#331258 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#331258 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331258
15.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331258#FFFFFF#000000##FFFFFF
##3312581.0015.351.3715.35
#FFFFFF15.351.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00255A
Deuteranopia (green-blind)
#002457
Tritanopia (blue-blind)
#2B2434
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331258;
/* rgb */ color: rgb(51, 18, 88);
/* oklch */ color: oklch(27.8% 0.118 300.2);
Tailwind
colors: {
  custom: {
    50: '#6f5388',
    500: '#331258',
    950: '#000000',
  },
}
SCSS
$custom: #331258;
$custom-light: #6f5388;
$custom-dark: #000000;
JSON
{
  "hex": "#331258",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 88
  },
  "hsl": {
    "h": 268.286,
    "s": 66.038,
    "l": 20.784
  },
  "oklch": {
    "l": 0.27831,
    "c": 0.11767,
    "h": 300.2
  },
  "luminance": 0.01841
}

Semantic roles & 50–950 ramp

primary
#331258
secondary
#669135
accent
#E93F99
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#08030B
muted
#7B787C

Preview Lab

Preview with #331258

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

Preview Lab → · Contrast checker → · Palette generator →

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