#2F177A#2F177A

#2F177A is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.154 H 284.4°. Best body text is #FFFFFF at 13.78:1 contrast (WCAG AA passes).

Color values

HEX#2F177A
RGBrgb(47, 23, 122)
HSLhsl(255, 68%, 28%)
HSVhsv(255, 81%, 48%)
CMYKcmyk(61.5%, 81.1%, 0%, 52.2%)
CIE-LABlab(18.46, 38.69, -51.66)
CIE-LCHlch(18.46, 64.54, 306.83°)
OKLaboklab(31.45% 0.0382 -0.1489)
OKLCHoklch(31.45% 0.154 284.4)
XYZxyz(4.9905, 2.6220, 18.6517)
Luminance0.0262 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F177A #627A17
analogous
#17317A #2F177A #60177A
triadic
#2F177A #7A2F17 #177A2F
tetradic
#2F177A #7A1731 #627A17 #177A60
square
#2F177A #7A1731 #627A17 #177A60
split-complementary
#2F177A #7A6017 #317A17
monochromatic
#0A051A #1B0D47 #2F177A #4321AD #5B33D9

Accessibility & contrast

On white

13.78
#2F177A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2F177A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F177A
13.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F177A#FFFFFF#000000##FFFFFF
##2F177A1.0013.781.5213.78
#FFFFFF13.781.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307D
Deuteranopia (green-blind)
#002A78
Tritanopia (blue-blind)
#013448
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f177a;
/* rgb */ color: rgb(47, 23, 122);
/* oklch */ color: oklch(31.4% 0.154 284.4);
Tailwind
colors: {
  custom: {
    50: '#7258a1',
    500: '#2f177a',
    950: '#000000',
  },
}
SCSS
$custom: #2f177a;
$custom-light: #7258a1;
$custom-dark: #000000;
JSON
{
  "hex": "#2f177a",
  "rgb": {
    "r": 47,
    "g": 23,
    "b": 122
  },
  "hsl": {
    "h": 254.545,
    "s": 68.276,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31449,
    "c": 0.15369,
    "h": 284.4
  },
  "luminance": 0.02622
}

Semantic roles & 50–950 ramp

primary
#2F177A
secondary
#94AF3E
accent
#EB3DC1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2F177A

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

Preview Lab → · Contrast checker → · Palette generator →

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