#2F157C#2F157C

#2F157C is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.158 H 284.2°. Best body text is #FFFFFF at 13.82:1 contrast (WCAG AA passes).

Color values

HEX#2F157C
RGBrgb(47, 21, 124)
HSLhsl(255, 71%, 28%)
HSVhsv(255, 83%, 49%)
CMYKcmyk(62.1%, 83.1%, 0%, 51.4%)
CIE-LABlab(18.35, 40.27, -53.13)
CIE-LCHlch(18.35, 66.66, 307.16°)
OKLaboklab(31.43% 0.0388 -0.1531)
OKLCHoklch(31.43% 0.158 284.2)
XYZxyz(5.0774, 2.5956, 19.2983)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F157C #627C15
analogous
#152E7C #2F157C #62157C
triadic
#2F157C #7C2F15 #157C2F
tetradic
#2F157C #7C152E #627C15 #157C62
square
#2F157C #7C152E #627C15 #157C62
split-complementary
#2F157C #7C6215 #2E7C15
monochromatic
#0A041A #1B0C48 #2F157C #431EB0 #5B30DC

Accessibility & contrast

On white

13.82
#2F157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2F157C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F157C
13.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F157C#FFFFFF#000000##FFFFFF
##2F157C1.0013.821.5213.82
#FFFFFF13.821.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307F
Deuteranopia (green-blind)
#00297A
Tritanopia (blue-blind)
#003449
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f157c;
/* rgb */ color: rgb(47, 21, 124);
/* oklch */ color: oklch(31.4% 0.158 284.2);
Tailwind
colors: {
  custom: {
    50: '#7357a3',
    500: '#2f157c',
    950: '#000000',
  },
}
SCSS
$custom: #2f157c;
$custom-light: #7357a3;
$custom-dark: #000000;
JSON
{
  "hex": "#2f157c",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 255.146,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31434,
    "c": 0.15798,
    "h": 284.2
  },
  "luminance": 0.02596
}

Semantic roles & 50–950 ramp

primary
#2F157C
secondary
#94B13C
accent
#EE3AC0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F157C

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

Preview Lab → · Contrast checker → · Palette generator →

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