#2F157B#2F157B

#2F157B is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.157 H 284.5°. Best body text is #FFFFFF at 13.87:1 contrast (WCAG AA passes).

Color values

HEX#2F157B
RGBrgb(47, 21, 123)
HSLhsl(255, 71%, 28%)
HSVhsv(255, 83%, 48%)
CMYKcmyk(61.8%, 82.9%, 0%, 51.8%)
CIE-LABlab(18.23, 39.97, -52.67)
CIE-LCHlch(18.23, 66.12, 307.19°)
OKLaboklab(31.32% 0.0391 -0.1518)
OKLCHoklch(31.32% 0.157 284.5)
XYZxyz(5.0145, 2.5704, 18.9669)
Luminance0.0257 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F157B #617B15
analogous
#152E7B #2F157B #62157B
triadic
#2F157B #7B2F15 #157B2F
tetradic
#2F157B #7B152E #617B15 #157B62
square
#2F157B #7B152E #617B15 #157B62
split-complementary
#2F157B #7B6215 #2E7B15
monochromatic
#0A041A #1B0C47 #2F157B #431EAF #5B2FDB

Accessibility & contrast

On white

13.87
#2F157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2F157B
13.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F157B#FFFFFF#000000##FFFFFF
##2F157B1.0013.871.5113.87
#FFFFFF13.871.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7E
Deuteranopia (green-blind)
#002979
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2f157b;
/* rgb */ color: rgb(47, 21, 123);
/* oklch */ color: oklch(31.3% 0.157 284.5);
Tailwind
colors: {
  custom: {
    50: '#7257a2',
    500: '#2f157b',
    950: '#000000',
  },
}
SCSS
$custom: #2f157b;
$custom-light: #7257a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2f157b",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 255.294,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31324,
    "c": 0.15678,
    "h": 284.5
  },
  "luminance": 0.02571
}

Semantic roles & 50–950 ramp

primary
#2F157B
secondary
#93B03B
accent
#EE3AC0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F157B

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

Preview Lab → · Contrast checker → · Palette generator →

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