#2F1F7F#2F1F7F

#2F1F7F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.0% C 0.152 H 281.8°. Best body text is #FFFFFF at 12.94:1 contrast (WCAG AA passes).

Color values

HEX#2F1F7F
RGBrgb(47, 31, 127)
HSLhsl(250, 61%, 31%)
HSVhsv(250, 76%, 50%)
CMYKcmyk(63%, 75.6%, 0%, 50.2%)
CIE-LABlab(20.50, 35.96, -51.48)
CIE-LCHlch(20.50, 62.79, 304.93°)
OKLaboklab(33.04% 0.031 -0.1484)
OKLCHoklch(33.04% 0.152 281.8)
XYZxyz(5.4918, 3.1162, 20.3867)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1F7F #6F7F1F
analogous
#1F3F7F #2F1F7F #5F1F7F
triadic
#2F1F7F #7F2F1F #1F7F2F
tetradic
#2F1F7F #7F1F3F #6F7F1F #1F7F5F
square
#2F1F7F #7F1F3F #6F7F1F #1F7F5F
split-complementary
#2F1F7F #7F5F1F #3F7F1F
monochromatic
#0B071D #1D134E #2F1F7F #412BB0 #5E46D2

Accessibility & contrast

On white

12.94
#2F1F7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#2F1F7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1F7F
12.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1F7F#FFFFFF#000000##FFFFFF
##2F1F7F1.0012.941.6212.94
#FFFFFF12.941.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003582
Deuteranopia (green-blind)
#002E7D
Tritanopia (blue-blind)
#003A4D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2f1f7f;
/* rgb */ color: rgb(47, 31, 127);
/* oklch */ color: oklch(33.0% 0.152 281.8);
Tailwind
colors: {
  custom: {
    50: '#725da5',
    500: '#2f1f7f',
    950: '#000000',
  },
}
SCSS
$custom: #2f1f7f;
$custom-light: #725da5;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1f7f",
  "rgb": {
    "r": 47,
    "g": 31,
    "b": 127
  },
  "hsl": {
    "h": 250,
    "s": 60.759,
    "l": 30.98
  },
  "oklch": {
    "l": 0.33042,
    "c": 0.15163,
    "h": 281.8
  },
  "luminance": 0.03117
}

Semantic roles & 50–950 ramp

primary
#2F1F7F
secondary
#A0B248
accent
#E444C9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #2F1F7F

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

Preview Lab → · Contrast checker → · Palette generator →

#2F1F7F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva