#2F157E#2F157E

#2F157E is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.7% C 0.160 H 283.7°. Best body text is #FFFFFF at 13.73:1 contrast (WCAG AA passes).

Color values

HEX#2F157E
RGBrgb(47, 21, 126)
HSLhsl(255, 71%, 29%)
HSVhsv(255, 83%, 49%)
CMYKcmyk(62.7%, 83.3%, 0%, 50.6%)
CIE-LABlab(18.57, 40.87, -54.03)
CIE-LCHlch(18.57, 67.75, 307.10°)
OKLaboklab(31.66% 0.0381 -0.1558)
OKLCHoklch(31.66% 0.16 283.7)
XYZxyz(5.2052, 2.6467, 19.9712)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F157E #647E15
analogous
#15307E #2F157E #64157E
triadic
#2F157E #7E2F15 #157E2F
tetradic
#2F157E #7E1530 #647E15 #157E64
square
#2F157E #7E1530 #647E15 #157E64
split-complementary
#2F157E #7E6415 #307E15
monochromatic
#0A041A #1B0C4A #2F157E #431EB2 #5B31DD

Accessibility & contrast

On white

13.73
#2F157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2F157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F157E
13.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F157E#FFFFFF#000000##FFFFFF
##2F157E1.0013.731.5313.73
#FFFFFF13.731.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003081
Deuteranopia (green-blind)
#002A7C
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f157e;
/* rgb */ color: rgb(47, 21, 126);
/* oklch */ color: oklch(31.7% 0.160 283.7);
Tailwind
colors: {
  custom: {
    50: '#7357a4',
    500: '#2f157e',
    950: '#000000',
  },
}
SCSS
$custom: #2f157e;
$custom-light: #7357a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f157e",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 254.857,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31655,
    "c": 0.16037,
    "h": 283.7
  },
  "luminance": 0.02647
}

Semantic roles & 50–950 ramp

primary
#2F157E
secondary
#96B33C
accent
#EE3AC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F157E

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

Preview Lab → · Contrast checker → · Palette generator →

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