#2F158A#2F158A

#2F158A is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.0% C 0.175 H 281.2°. Best body text is #FFFFFF at 13.16:1 contrast (WCAG AA passes).

Color values

HEX#2F158A
RGBrgb(47, 21, 138)
HSLhsl(253, 74%, 31%)
HSVhsv(253, 85%, 54%)
CMYKcmyk(65.9%, 84.8%, 0%, 45.9%)
CIE-LABlab(19.94, 44.45, -59.34)
CIE-LCHlch(19.94, 74.14, 306.84°)
OKLaboklab(33.01% 0.0339 -0.1712)
OKLCHoklch(33.01% 0.175 281.2)
XYZxyz(6.0265, 2.9752, 24.2965)
Luminance0.0298 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F158A #708A15
analogous
#15358A #2F158A #69158A
triadic
#2F158A #8A2F15 #158A2F
tetradic
#2F158A #8A1535 #708A15 #158A69
square
#2F158A #8A1535 #708A15 #158A69
split-complementary
#2F158A #8A6915 #358A15
monochromatic
#0B0520 #1D0D55 #2F158A #411DBF #5E39E1

Accessibility & contrast

On white

13.16
#2F158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#2F158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F158A
13.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F158A#FFFFFF#000000##FFFFFF
##2F158A1.0013.161.6013.16
#FFFFFF13.161.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348D
Deuteranopia (green-blind)
#002C88
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2f158a;
/* rgb */ color: rgb(47, 21, 138);
/* oklch */ color: oklch(33.0% 0.175 281.2);
Tailwind
colors: {
  custom: {
    50: '#7558ad',
    500: '#2f158a',
    950: '#000000',
  },
}
SCSS
$custom: #2f158a;
$custom-light: #7558ad;
$custom-dark: #000000;
JSON
{
  "hex": "#2f158a",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 253.333,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33009,
    "c": 0.17455,
    "h": 281.2
  },
  "luminance": 0.02976
}

Semantic roles & 50–950 ramp

primary
#2F158A
secondary
#A1BE3D
accent
#F038C7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0310
muted
#7C787F

Preview Lab

Preview with #2F158A

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

Preview Lab → · Contrast checker → · Palette generator →

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