#2F1271#2F1271

#2F1271 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.9% C 0.148 H 287.6°. Best body text is #FFFFFF at 14.52:1 contrast (WCAG AA passes).

Color values

HEX#2F1271
RGBrgb(47, 18, 113)
HSLhsl(258, 73%, 26%)
HSVhsv(258, 84%, 44%)
CMYKcmyk(58.4%, 84.1%, 0%, 55.7%)
CIE-LABlab(16.65, 38.38, -48.86)
CIE-LCHlch(16.65, 62.13, 308.16°)
OKLaboklab(29.89% 0.0446 -0.1406)
OKLCHoklch(29.89% 0.148 287.6)
XYZxyz(4.3683, 2.2290, 15.8196)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1271 #547112
analogous
#122471 #2F1271 #5E1271
triadic
#2F1271 #712F12 #12712F
tetradic
#2F1271 #711224 #547112 #12715E
square
#2F1271 #711224 #547112 #12715E
split-complementary
#2F1271 #715E12 #247112
monochromatic
#0B041A #190A3C #2F1271 #451AA6 #5B23DB

Accessibility & contrast

On white

14.52
#2F1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#2F1271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1271
14.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1271#FFFFFF#000000##FFFFFF
##2F12711.0014.521.4514.52
#FFFFFF14.521.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00276F
Tritanopia (blue-blind)
#112E42
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2f1271;
/* rgb */ color: rgb(47, 18, 113);
/* oklch */ color: oklch(29.9% 0.148 287.6);
Tailwind
colors: {
  custom: {
    50: '#71559b',
    500: '#2f1271',
    950: '#000000',
  },
}
SCSS
$custom: #2f1271;
$custom-light: #71559b;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1271",
  "rgb": {
    "r": 47,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 258.316,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29894,
    "c": 0.14754,
    "h": 287.6
  },
  "luminance": 0.02229
}

Semantic roles & 50–950 ramp

primary
#2F1271
secondary
#85A837
accent
#EF39B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2F1271

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

Preview Lab → · Contrast checker → · Palette generator →

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