#2F175B#2F175B

#2F175B is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.3% C 0.114 H 294.0°. Best body text is #FFFFFF at 15.06:1 contrast (WCAG AA passes).

Color values

HEX#2F175B
RGBrgb(47, 23, 91)
HSLhsl(261, 60%, 22%)
HSVhsv(261, 75%, 36%)
CMYKcmyk(48.4%, 74.7%, 0%, 64.3%)
CIE-LABlab(15.34, 29.11, -36.49)
CIE-LCHlch(15.34, 46.68, 308.58°)
OKLaboklab(28.3% 0.0465 -0.1045)
OKLCHoklch(28.3% 0.114 294)
XYZxyz(3.3665, 1.9724, 10.0988)
Luminance0.0197 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F175B #435B17
analogous
#17215B #2F175B #51175B
triadic
#2F175B #5B2F17 #175B2F
tetradic
#2F175B #5B1721 #435B17 #175B51
square
#2F175B #5B1721 #435B17 #175B51
split-complementary
#2F175B #5B5117 #215B17
monochromatic
#0D0618 #160B2A #2F175B #48238C #6130BD

Accessibility & contrast

On white

15.06
#2F175B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.39
#2F175B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F175B
15.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F175B#FFFFFF#000000##FFFFFF
##2F175B1.0015.061.3915.06
#FFFFFF15.061.0021.001.00
#0000001.3921.001.0021.00
##FFFFFF15.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00275D
Deuteranopia (green-blind)
#00255A
Tritanopia (blue-blind)
#222837
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #2f175b;
/* rgb */ color: rgb(47, 23, 91);
/* oklch */ color: oklch(28.3% 0.114 294.0);
Tailwind
colors: {
  custom: {
    50: '#6c568a',
    500: '#2f175b',
    950: '#000000',
  },
}
SCSS
$custom: #2f175b;
$custom-light: #6c568a;
$custom-dark: #000000;
JSON
{
  "hex": "#2f175b",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 91
  },
  "hsl": {
    "h": 261.176,
    "s": 59.649,
    "l": 22.353
  },
  "oklch": {
    "l": 0.283,
    "c": 0.11435,
    "h": 294
  },
  "luminance": 0.01972
}

Semantic roles & 50–950 ramp

primary
#2F175B
secondary
#74923C
accent
#E345AB
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #2F175B

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

Preview Lab → · Contrast checker → · Palette generator →

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