#2F179F#2F179F

#2F179F is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.6% C 0.197 H 277.5°. Best body text is #FFFFFF at 12.04:1 contrast (WCAG AA passes).

Color values

HEX#2F179F
RGBrgb(47, 23, 159)
HSLhsl(251, 75%, 36%)
HSVhsv(251, 86%, 62%)
CMYKcmyk(70.4%, 85.5%, 0%, 37.6%)
CIE-LABlab(22.72, 49.77, -67.72)
CIE-LCHlch(22.72, 84.04, 306.31°)
OKLaboklab(35.64% 0.0259 -0.1956)
OKLCHoklch(35.64% 0.197 277.5)
XYZxyz(7.7347, 3.7196, 33.1045)
Luminance0.0372 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F179F #879F17
analogous
#17439F #2F179F #73179F
triadic
#2F179F #9F2F17 #179F2F
tetradic
#2F179F #9F1743 #879F17 #179F73
square
#2F179F #9F1743 #879F17 #179F73
split-complementary
#2F179F #9F7317 #439F17
monochromatic
#0F0834 #1F0F6A #2F179F #3F1FD4 #664BE5

Accessibility & contrast

On white

12.04
#2F179F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#2F179F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F179F
12.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F179F#FFFFFF#000000##FFFFFF
##2F179F1.0012.041.7412.04
#FFFFFF12.041.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003BA3
Deuteranopia (green-blind)
#00319D
Tritanopia (blue-blind)
#00435E
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #2f179f;
/* rgb */ color: rgb(47, 23, 159);
/* oklch */ color: oklch(35.6% 0.197 277.5);
Tailwind
colors: {
  custom: {
    50: '#7a5bbd',
    500: '#2f179f',
    950: '#000000',
  },
}
SCSS
$custom: #2f179f;
$custom-light: #7a5bbd;
$custom-dark: #000000;
JSON
{
  "hex": "#2f179f",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 159
  },
  "hsl": {
    "h": 250.588,
    "s": 74.725,
    "l": 35.686
  },
  "oklch": {
    "l": 0.3564,
    "c": 0.19732,
    "h": 277.5
  },
  "luminance": 0.0372
}

Semantic roles & 50–950 ramp

primary
#2F179F
secondary
#B1C74B
accent
#F136D0
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #2F179F

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

Preview Lab → · Contrast checker → · Palette generator →

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