#2F1796#2F1796

#2F1796 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.6% C 0.187 H 278.9°. Best body text is #FFFFFF at 12.47:1 contrast (WCAG AA passes).

Color values

HEX#2F1796
RGBrgb(47, 23, 150)
HSLhsl(251, 73%, 34%)
HSVhsv(251, 85%, 59%)
CMYKcmyk(68.7%, 84.7%, 0%, 41.2%)
CIE-LABlab(21.65, 47.13, -63.98)
CIE-LCHlch(21.65, 79.46, 306.38°)
OKLaboklab(34.59% 0.0289 -0.1847)
OKLCHoklch(34.59% 0.187 278.9)
XYZxyz(6.9819, 3.4185, 29.1402)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1796 #7E9617
analogous
#173F96 #2F1796 #6F1796
triadic
#2F1796 #962F17 #17962F
tetradic
#2F1796 #96173F #7E9617 #17966F
square
#2F1796 #96173F #7E9617 #17966F
split-complementary
#2F1796 #966F17 #3F9617
monochromatic
#0E072C #1E0F61 #2F1796 #401FCB #6345E2

Accessibility & contrast

On white

12.47
#2F1796 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#2F1796 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1796
12.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1796#FFFFFF#000000##FFFFFF
##2F17961.0012.471.6812.47
#FFFFFF12.471.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003999
Deuteranopia (green-blind)
#002F94
Tritanopia (blue-blind)
#004059
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #2f1796;
/* rgb */ color: rgb(47, 23, 150);
/* oklch */ color: oklch(34.6% 0.187 278.9);
Tailwind
colors: {
  custom: {
    50: '#785ab6',
    500: '#2f1796',
    950: '#000000',
  },
}
SCSS
$custom: #2f1796;
$custom-light: #785ab6;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1796",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 150
  },
  "hsl": {
    "h": 251.339,
    "s": 73.41,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34591,
    "c": 0.18698,
    "h": 278.9
  },
  "luminance": 0.03419
}

Semantic roles & 50–950 ramp

primary
#2F1796
secondary
#ACC345
accent
#F038CD
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2F1796

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

Preview Lab → · Contrast checker → · Palette generator →

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