#2F216B#2F216B

#2F216B is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.4% C 0.122 H 285.6°. Best body text is #FFFFFF at 13.54:1 contrast (WCAG AA passes).

Color values

HEX#2F216B
RGBrgb(47, 33, 107)
HSLhsl(251, 53%, 27%)
HSVhsv(251, 69%, 42%)
CMYKcmyk(56.1%, 69.2%, 0%, 58%)
CIE-LABlab(19.03, 28.13, -41.05)
CIE-LCHlch(19.03, 49.76, 304.42°)
OKLaboklab(31.4% 0.033 -0.1179)
OKLCHoklch(31.4% 0.122 285.6)
XYZxyz(4.3692, 2.7534, 14.2083)
Luminance0.0275 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F216B #5D6B21
analogous
#21386B #2F216B #54216B
triadic
#2F216B #6B2F21 #216B2F
tetradic
#2F216B #6B2138 #5D6B21 #216B54
square
#2F216B #6B2138 #5D6B21 #216B54
split-complementary
#2F216B #6B5421 #386B21
monochromatic
#0A0717 #1A133C #2F216B #442F9A #5B42C5

Accessibility & contrast

On white

13.54
#2F216B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#2F216B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F216B
13.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F216B#FFFFFF#000000##FFFFFF
##2F216B1.0013.541.5513.54
#FFFFFF13.541.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00306D
Deuteranopia (green-blind)
#002C6A
Tritanopia (blue-blind)
#163343
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f216b;
/* rgb */ color: rgb(47, 33, 107);
/* oklch */ color: oklch(31.4% 0.122 285.6);
Tailwind
colors: {
  custom: {
    50: '#6e5d96',
    500: '#2f216b',
    950: '#000000',
  },
}
SCSS
$custom: #2f216b;
$custom-light: #6e5d96;
$custom-dark: #000000;
JSON
{
  "hex": "#2f216b",
  "rgb": {
    "r": 47,
    "g": 33,
    "b": 107
  },
  "hsl": {
    "h": 251.351,
    "s": 52.857,
    "l": 27.451
  },
  "oklch": {
    "l": 0.31398,
    "c": 0.12239,
    "h": 285.6
  },
  "luminance": 0.02754
}

Semantic roles & 50–950 ramp

primary
#2F216B
secondary
#8F9F49
accent
#DC4CC1
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #2F216B

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

Preview Lab → · Contrast checker → · Palette generator →

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