#2F1158#2F1158

#2F1158 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 27.2% C 0.118 H 296.9°. Best body text is #FFFFFF at 15.65:1 contrast (WCAG AA passes).

Color values

HEX#2F1158
RGBrgb(47, 17, 88)
HSLhsl(265, 68%, 21%)
HSVhsv(265, 81%, 35%)
CMYKcmyk(46.6%, 80.7%, 0%, 65.5%)
CIE-LABlab(13.88, 31.52, -36.85)
CIE-LCHlch(13.88, 48.49, 310.54°)
OKLaboklab(27.18% 0.0536 -0.1055)
OKLCHoklch(27.18% 0.118 296.9)
XYZxyz(3.1337, 1.7098, 9.3955)
Luminance0.0171 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1158 #3A5811
analogous
#111658 #2F1158 #521158
triadic
#2F1158 #582F11 #11582F
tetradic
#2F1158 #581116 #3A5811 #115852
square
#2F1158 #581116 #3A5811 #115852
split-complementary
#2F1158 #585211 #165811
monochromatic
#0E051A #140725 #2F1158 #4A1B8B #6625BF

Accessibility & contrast

On white

15.65
#2F1158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.34
#2F1158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1158
15.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1158#FFFFFF#000000##FFFFFF
##2F11581.0015.651.3415.65
#FFFFFF15.651.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00245A
Deuteranopia (green-blind)
#002257
Tritanopia (blue-blind)
#242433
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #2f1158;
/* rgb */ color: rgb(47, 17, 88);
/* oklch */ color: oklch(27.2% 0.118 296.9);
Tailwind
colors: {
  custom: {
    50: '#6c5288',
    500: '#2f1158',
    950: '#000000',
  },
}
SCSS
$custom: #2f1158;
$custom-light: #6c5288;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1158",
  "rgb": {
    "r": 47,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 265.352,
    "s": 67.619,
    "l": 20.588
  },
  "oklch": {
    "l": 0.2718,
    "c": 0.11832,
    "h": 296.9
  },
  "luminance": 0.0171
}

Semantic roles & 50–950 ramp

primary
#2F1158
secondary
#6A9134
accent
#EA3DA1
background
#F6F4F8
surface
#ECE7F0
border
#C7C3CB
text
#07020B
muted
#7A787C

Preview Lab

Preview with #2F1158

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

Preview Lab → · Contrast checker → · Palette generator →

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