#2F1B71#2F1B71

#2F1B71 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.0% C 0.138 H 285.8°. Best body text is #FFFFFF at 13.85:1 contrast (WCAG AA passes).

Color values

HEX#2F1B71
RGBrgb(47, 27, 113)
HSLhsl(254, 61%, 27%)
HSVhsv(254, 76%, 44%)
CMYKcmyk(58.4%, 76.1%, 0%, 55.7%)
CIE-LABlab(18.28, 33.72, -46.17)
CIE-LCHlch(18.28, 57.18, 306.14°)
OKLaboklab(31.04% 0.0376 -0.1329)
OKLCHoklch(31.04% 0.138 285.8)
XYZxyz(4.5440, 2.5802, 15.8782)
Luminance0.0258 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1B71 #5D711B
analogous
#1B3271 #2F1B71 #5A1B71
triadic
#2F1B71 #712F1B #1B712F
tetradic
#2F1B71 #711B32 #5D711B #1B715A
square
#2F1B71 #711B32 #5D711B #1B715A
split-complementary
#2F1B71 #715A1B #32711B
monochromatic
#0A0619 #1A0F40 #2F1B71 #4427A2 #5B37CF

Accessibility & contrast

On white

13.85
#2F1B71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2F1B71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1B71
13.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1B71#FFFFFF#000000##FFFFFF
##2F1B711.0013.851.5213.85
#FFFFFF13.851.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F74
Deuteranopia (green-blind)
#002A6F
Tritanopia (blue-blind)
#103244
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f1b71;
/* rgb */ color: rgb(47, 27, 113);
/* oklch */ color: oklch(31.0% 0.138 285.8);
Tailwind
colors: {
  custom: {
    50: '#705a9b',
    500: '#2f1b71',
    950: '#000000',
  },
}
SCSS
$custom: #2f1b71;
$custom-light: #705a9b;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1b71",
  "rgb": {
    "r": 47,
    "g": 27,
    "b": 113
  },
  "hsl": {
    "h": 253.953,
    "s": 61.429,
    "l": 27.451
  },
  "oklch": {
    "l": 0.31036,
    "c": 0.13809,
    "h": 285.8
  },
  "luminance": 0.0258
}

Semantic roles & 50–950 ramp

primary
#2F1B71
secondary
#8FA642
accent
#E543BF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #2F1B71

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

Preview Lab → · Contrast checker → · Palette generator →

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