#2F177B#2F177B

#2F177B is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.6% C 0.155 H 284.1°. Best body text is #FFFFFF at 13.73:1 contrast (WCAG AA passes).

Color values

HEX#2F177B
RGBrgb(47, 23, 123)
HSLhsl(254, 68%, 29%)
HSVhsv(254, 81%, 48%)
CMYKcmyk(61.8%, 81.3%, 0%, 51.8%)
CIE-LABlab(18.57, 38.99, -52.12)
CIE-LCHlch(18.57, 65.09, 306.80°)
OKLaboklab(31.56% 0.0378 -0.1502)
OKLCHoklch(31.56% 0.155 284.1)
XYZxyz(5.0527, 2.6469, 18.9797)
Luminance0.0265 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F177B #637B17
analogous
#17317B #2F177B #61177B
triadic
#2F177B #7B2F17 #177B2F
tetradic
#2F177B #7B1731 #637B17 #177B61
square
#2F177B #7B1731 #637B17 #177B61
split-complementary
#2F177B #7B6117 #317B17
monochromatic
#0A051A #1B0D47 #2F177B #4321AF #5B33D9

Accessibility & contrast

On white

13.73
#2F177B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2F177B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F177B
13.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F177B#FFFFFF#000000##FFFFFF
##2F177B1.0013.731.5313.73
#FFFFFF13.731.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307E
Deuteranopia (green-blind)
#002A79
Tritanopia (blue-blind)
#003549
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f177b;
/* rgb */ color: rgb(47, 23, 123);
/* oklch */ color: oklch(31.6% 0.155 284.1);
Tailwind
colors: {
  custom: {
    50: '#7258a2',
    500: '#2f177b',
    950: '#000000',
  },
}
SCSS
$custom: #2f177b;
$custom-light: #7258a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2f177b",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 123
  },
  "hsl": {
    "h": 254.4,
    "s": 68.493,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31557,
    "c": 0.15491,
    "h": 284.1
  },
  "luminance": 0.02647
}

Semantic roles & 50–950 ramp

primary
#2F177B
secondary
#95B03E
accent
#EB3CC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F177B

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

Preview Lab → · Contrast checker → · Palette generator →

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