#2F177D#2F177D

#2F177D is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.157 H 283.7°. Best body text is #FFFFFF at 13.64:1 contrast (WCAG AA passes).

Color values

HEX#2F177D
RGBrgb(47, 23, 125)
HSLhsl(254, 69%, 29%)
HSVhsv(254, 82%, 49%)
CMYKcmyk(62.4%, 81.6%, 0%, 51%)
CIE-LABlab(18.79, 39.61, -53.03)
CIE-LCHlch(18.79, 66.19, 306.75°)
OKLaboklab(31.78% 0.0372 -0.1529)
OKLCHoklch(31.78% 0.157 283.7)
XYZxyz(5.1792, 2.6975, 19.6458)
Luminance0.0270 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F177D #657D17
analogous
#17327D #2F177D #62177D
triadic
#2F177D #7D2F17 #177D2F
tetradic
#2F177D #7D1732 #657D17 #177D62
square
#2F177D #7D1732 #657D17 #177D62
split-complementary
#2F177D #7D6217 #327D17
monochromatic
#0A051A #1C0D49 #2F177D #4221B1 #5B35DA

Accessibility & contrast

On white

13.64
#2F177D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#2F177D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F177D
13.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F177D#FFFFFF#000000##FFFFFF
##2F177D1.0013.641.5413.64
#FFFFFF13.641.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003180
Deuteranopia (green-blind)
#002A7B
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2f177d;
/* rgb */ color: rgb(47, 23, 125);
/* oklch */ color: oklch(31.8% 0.157 283.7);
Tailwind
colors: {
  custom: {
    50: '#7358a4',
    500: '#2f177d',
    950: '#000000',
  },
}
SCSS
$custom: #2f177d;
$custom-light: #7358a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2f177d",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 125
  },
  "hsl": {
    "h": 254.118,
    "s": 68.919,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31775,
    "c": 0.15735,
    "h": 283.7
  },
  "luminance": 0.02698
}

Semantic roles & 50–950 ramp

primary
#2F177D
secondary
#97B23E
accent
#EC3CC2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F177D

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

Preview Lab → · Contrast checker → · Palette generator →

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