#2F156C#2F156C

#2F156C is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.7% C 0.138 H 288.5°. Best body text is #FFFFFF at 14.54:1 contrast (WCAG AA passes).

Color values

HEX#2F156C
RGBrgb(47, 21, 108)
HSLhsl(258, 67%, 25%)
HSVhsv(258, 81%, 42%)
CMYKcmyk(56.5%, 80.6%, 0%, 57.6%)
CIE-LABlab(16.62, 35.42, -45.65)
CIE-LCHlch(16.62, 57.78, 307.81°)
OKLaboklab(29.71% 0.044 -0.1313)
OKLCHoklch(29.71% 0.138 288.5)
XYZxyz(4.1464, 2.2232, 14.3951)
Luminance0.0222 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F156C #526C15
analogous
#15266C #2F156C #5A156C
triadic
#2F156C #6C2F15 #156C2F
tetradic
#2F156C #6C1526 #526C15 #156C5A
square
#2F156C #6C1526 #526C15 #156C5A
split-complementary
#2F156C #6C5A15 #266C15
monochromatic
#0B051A #190B39 #2F156C #451F9F #5C29D2

Accessibility & contrast

On white

14.54
#2F156C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#2F156C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F156C
14.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F156C#FFFFFF#000000##FFFFFF
##2F156C1.0014.541.4414.54
#FFFFFF14.541.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B6E
Deuteranopia (green-blind)
#00276A
Tritanopia (blue-blind)
#172E40
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2f156c;
/* rgb */ color: rgb(47, 21, 108);
/* oklch */ color: oklch(29.7% 0.138 288.5);
Tailwind
colors: {
  custom: {
    50: '#6f5697',
    500: '#2f156c',
    950: '#000000',
  },
}
SCSS
$custom: #2f156c;
$custom-light: #6f5697;
$custom-dark: #000000;
JSON
{
  "hex": "#2f156c",
  "rgb": {
    "r": 47,
    "g": 21,
    "b": 108
  },
  "hsl": {
    "h": 257.931,
    "s": 67.442,
    "l": 25.294
  },
  "oklch": {
    "l": 0.29713,
    "c": 0.13849,
    "h": 288.5
  },
  "luminance": 0.02223
}

Semantic roles & 50–950 ramp

primary
#2F156C
secondary
#83A33A
accent
#EA3DB7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2F156C

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

Preview Lab → · Contrast checker → · Palette generator →

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