#2F1F7E#2F1F7E

#2F1F7E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 32.9% C 0.150 H 282.0°. Best body text is #FFFFFF at 12.98:1 contrast (WCAG AA passes).

Color values

HEX#2F1F7E
RGBrgb(47, 31, 126)
HSLhsl(250, 61%, 31%)
HSVhsv(250, 75%, 49%)
CMYKcmyk(62.7%, 75.4%, 0%, 50.6%)
CIE-LABlab(20.40, 35.63, -51.01)
CIE-LCHlch(20.40, 62.22, 304.93°)
OKLaboklab(32.94% 0.0312 -0.1471)
OKLCHoklch(32.94% 0.15 282)
XYZxyz(5.4270, 3.0903, 20.0451)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1F7E #6E7E1F
analogous
#1F3E7E #2F1F7E #5E1F7E
triadic
#2F1F7E #7E2F1F #1F7E2F
tetradic
#2F1F7E #7E1F3E #6E7E1F #1F7E5E
square
#2F1F7E #7E1F3E #6E7E1F #1F7E5E
split-complementary
#2F1F7E #7E5E1F #3E7E1F
monochromatic
#0A071C #1D134D #2F1F7E #412BAF #5D46D1

Accessibility & contrast

On white

12.98
#2F1F7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F1F7E
12.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1F7E#FFFFFF#000000##FFFFFF
##2F1F7E1.0012.981.6212.98
#FFFFFF12.981.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003481
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#00394C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2f1f7e;
/* rgb */ color: rgb(47, 31, 126);
/* oklch */ color: oklch(32.9% 0.150 282.0);
Tailwind
colors: {
  custom: {
    50: '#725da4',
    500: '#2f1f7e',
    950: '#000000',
  },
}
SCSS
$custom: #2f1f7e;
$custom-light: #725da4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1f7e",
  "rgb": {
    "r": 47,
    "g": 31,
    "b": 126
  },
  "hsl": {
    "h": 250.105,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.32939,
    "c": 0.15034,
    "h": 282
  },
  "luminance": 0.03091
}

Semantic roles & 50–950 ramp

primary
#2F1F7E
secondary
#9FB148
accent
#E444C9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #2F1F7E

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

Preview Lab → · Contrast checker → · Palette generator →

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