#2F158E#2F158E

#2F158E is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.179 H 280.4°. Best body text is #FFFFFF at 12.97:1 contrast (WCAG AA passes).

Color values

HEX#2F158E
RGBrgb(47, 21, 142)
HSLhsl(253, 74%, 32%)
HSVhsv(253, 85%, 56%)
CMYKcmyk(66.9%, 85.2%, 0%, 44.3%)
CIE-LABlab(20.41, 45.63, -61.06)
CIE-LCHlch(20.41, 76.22, 306.77°)
OKLaboklab(33.47% 0.0325 -0.1762)
OKLCHoklch(33.47% 0.179 280.4)
XYZxyz(6.3214, 3.0932, 25.8499)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F158E #748E15
analogous
#15378E #2F158E #6C158E
triadic
#2F158E #8E2F15 #158E2F
tetradic
#2F158E #8E1537 #748E15 #158E6C
square
#2F158E #8E1537 #748E15 #158E6C
split-complementary
#2F158E #8E6C15 #378E15
monochromatic
#0C0523 #1D0D59 #2F158E #411DC3 #5F3BE2

Accessibility & contrast

On white

12.97
#2F158E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#2F158E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F158E
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F158E#FFFFFF#000000##FFFFFF
##2F158E1.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003591
Deuteranopia (green-blind)
#002D8C
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #2f158e;
/* rgb */ color: rgb(47, 21, 142);
/* oklch */ color: oklch(33.5% 0.179 280.4);
Tailwind
colors: {
  custom: {
    50: '#7658b0',
    500: '#2f158e',
    950: '#000000',
  },
}
SCSS
$custom: #2f158e;
$custom-light: #7658b0;
$custom-dark: #000000;
JSON
{
  "hex": "#2f158e",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 142
  },
  "hsl": {
    "h": 252.893,
    "s": 74.233,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33468,
    "c": 0.1792,
    "h": 280.4
  },
  "luminance": 0.03094
}

Semantic roles & 50–950 ramp

primary
#2F158E
secondary
#A5C23D
accent
#F137C9
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2F158E

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

Preview Lab → · Contrast checker → · Palette generator →

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