#2F157A#2F157A

#2F157A is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.2% C 0.156 H 284.7°. Best body text is #FFFFFF at 13.91:1 contrast (WCAG AA passes).

Color values

HEX#2F157A
RGBrgb(47, 21, 122)
HSLhsl(255, 71%, 28%)
HSVhsv(255, 83%, 48%)
CMYKcmyk(61.5%, 82.8%, 0%, 52.2%)
CIE-LABlab(18.12, 39.67, -52.22)
CIE-LCHlch(18.12, 65.57, 307.22°)
OKLaboklab(31.21% 0.0395 -0.1505)
OKLCHoklch(31.21% 0.156 284.7)
XYZxyz(4.9522, 2.5455, 18.6390)
Luminance0.0255 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F157A #607A15
analogous
#152D7A #2F157A #61157A
triadic
#2F157A #7A2F15 #157A2F
tetradic
#2F157A #7A152D #607A15 #157A61
square
#2F157A #7A152D #607A15 #157A61
split-complementary
#2F157A #7A6115 #2D7A15
monochromatic
#0A041A #1B0C46 #2F157A #431EAE #5B2EDB

Accessibility & contrast

On white

13.91
#2F157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2F157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F157A
13.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F157A#FFFFFF#000000##FFFFFF
##2F157A1.0013.911.5113.91
#FFFFFF13.911.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7D
Deuteranopia (green-blind)
#002978
Tritanopia (blue-blind)
#013348
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2f157a;
/* rgb */ color: rgb(47, 21, 122);
/* oklch */ color: oklch(31.2% 0.156 284.7);
Tailwind
colors: {
  custom: {
    50: '#7257a2',
    500: '#2f157a',
    950: '#000000',
  },
}
SCSS
$custom: #2f157a;
$custom-light: #7257a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2f157a",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 255.446,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31214,
    "c": 0.15558,
    "h": 284.7
  },
  "luminance": 0.02546
}

Semantic roles & 50–950 ramp

primary
#2F157A
secondary
#92AF3B
accent
#ED3ABF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F157A

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

Preview Lab → · Contrast checker → · Palette generator →

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