#2F1B8B#2F1B8B

#2F1B8B is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.171 H 280.3°. Best body text is #FFFFFF at 12.72:1 contrast (WCAG AA passes).

Color values

HEX#2F1B8B
RGBrgb(47, 27, 139)
HSLhsl(251, 67%, 33%)
HSVhsv(251, 81%, 55%)
CMYKcmyk(66.2%, 80.6%, 0%, 45.5%)
CIE-LABlab(21.03, 41.93, -58.17)
CIE-LCHlch(21.03, 71.71, 305.78°)
OKLaboklab(33.79% 0.0304 -0.1679)
OKLCHoklch(33.79% 0.171 280.3)
XYZxyz(6.2229, 3.2518, 24.7208)
Luminance0.0325 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1B8B #778B1B
analogous
#1B3F8B #2F1B8B #671B8B
triadic
#2F1B8B #8B2F1B #1B8B2F
tetradic
#2F1B8B #8B1B3F #778B1B #1B8B67
square
#2F1B8B #8B1B3F #778B1B #1B8B67
split-complementary
#2F1B8B #8B671B #3F8B1B
monochromatic
#0C0725 #1E1158 #2F1B8B #4025BE #6045DB

Accessibility & contrast

On white

12.72
#2F1B8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#2F1B8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1B8B
12.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1B8B#FFFFFF#000000##FFFFFF
##2F1B8B1.0012.721.6512.72
#FFFFFF12.721.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368E
Deuteranopia (green-blind)
#002E89
Tritanopia (blue-blind)
#003D53
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #2f1b8b;
/* rgb */ color: rgb(47, 27, 139);
/* oklch */ color: oklch(33.8% 0.171 280.3);
Tailwind
colors: {
  custom: {
    50: '#755bae',
    500: '#2f1b8b',
    950: '#000000',
  },
}
SCSS
$custom: #2f1b8b;
$custom-light: #755bae;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1b8b",
  "rgb": {
    "r": 47,
    "g": 27,
    "b": 139
  },
  "hsl": {
    "h": 250.714,
    "s": 67.47,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33791,
    "c": 0.17066,
    "h": 280.3
  },
  "luminance": 0.03252
}

Semantic roles & 50–950 ramp

primary
#2F1B8B
secondary
#A7BC45
accent
#EA3DCB
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #2F1B8B

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

Preview Lab → · Contrast checker → · Palette generator →

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