#2F159F#2F159F

#2F159F is a dark, vivid violet. Relative luminance 0.036; OKLCH L 35.5% C 0.199 H 277.7°. Best body text is #FFFFFF at 12.15:1 contrast (WCAG AA passes).

Color values

HEX#2F159F
RGBrgb(47, 21, 159)
HSLhsl(251, 77%, 35%)
HSVhsv(251, 87%, 62%)
CMYKcmyk(70.4%, 86.8%, 0%, 37.6%)
CIE-LABlab(22.45, 50.56, -68.17)
CIE-LCHlch(22.45, 84.87, 306.57°)
OKLaboklab(35.46% 0.0266 -0.1969)
OKLCHoklch(35.46% 0.199 277.7)
XYZxyz(7.6964, 3.6432, 33.0918)
Luminance0.0364 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F159F #859F15
analogous
#15409F #2F159F #74159F
triadic
#2F159F #9F2F15 #159F2F
tetradic
#2F159F #9F1540 #859F15 #159F74
square
#2F159F #9F1540 #859F15 #159F74
split-complementary
#2F159F #9F7415 #409F15
monochromatic
#0F0733 #1F0E69 #2F159F #3F1CD5 #6648E7

Accessibility & contrast

On white

12.15
#2F159F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#2F159F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F159F
12.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F159F#FFFFFF#000000##FFFFFF
##2F159F1.0012.151.7312.15
#FFFFFF12.151.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003BA3
Deuteranopia (green-blind)
#00309D
Tritanopia (blue-blind)
#00435D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #2f159f;
/* rgb */ color: rgb(47, 21, 159);
/* oklch */ color: oklch(35.5% 0.199 277.7);
Tailwind
colors: {
  custom: {
    50: '#7a5abd',
    500: '#2f159f',
    950: '#000000',
  },
}
SCSS
$custom: #2f159f;
$custom-light: #7a5abd;
$custom-dark: #000000;
JSON
{
  "hex": "#2f159f",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 159
  },
  "hsl": {
    "h": 251.304,
    "s": 76.667,
    "l": 35.294
  },
  "oklch": {
    "l": 0.35457,
    "c": 0.19865,
    "h": 277.7
  },
  "luminance": 0.03644
}

Semantic roles & 50–950 ramp

primary
#2F159F
secondary
#B0C848
accent
#F335CF
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #2F159F

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

Preview Lab → · Contrast checker → · Palette generator →

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