#2D177B#2D177B

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

Color values

HEX#2D177B
RGBrgb(45, 23, 123)
HSLhsl(253, 68%, 29%)
HSVhsv(253, 81%, 48%)
CMYKcmyk(63.4%, 81.3%, 0%, 51.8%)
CIE-LABlab(18.37, 38.75, -52.46)
CIE-LCHlch(18.37, 65.22, 306.45°)
OKLaboklab(31.37% 0.0346 -0.1513)
OKLCHoklch(31.37% 0.155 282.9)
XYZxyz(4.9626, 2.6004, 18.9755)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D177B #657B17
analogous
#17337B #2D177B #5F177B
triadic
#2D177B #7B2D17 #177B2D
tetradic
#2D177B #7B1733 #657B17 #177B5F
square
#2D177B #7B1733 #657B17 #177B5F
split-complementary
#2D177B #7B5F17 #337B17
monochromatic
#09051A #1A0D47 #2D177B #4021AF #5833D9

Accessibility & contrast

On white

13.81
#2D177B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2D177B
13.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D177B#FFFFFF#000000##FFFFFF
##2D177B1.0013.811.5213.81
#FFFFFF13.811.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.811.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2d177b;
/* rgb */ color: rgb(45, 23, 123);
/* oklch */ color: oklch(31.4% 0.155 282.9);
Tailwind
colors: {
  custom: {
    50: '#7158a2',
    500: '#2d177b',
    950: '#000000',
  },
}
SCSS
$custom: #2d177b;
$custom-light: #7158a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2d177b",
  "rgb": {
    "r": 45,
    "g": 23,
    "b": 123
  },
  "hsl": {
    "h": 253.2,
    "s": 68.493,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31366,
    "c": 0.15519,
    "h": 282.9
  },
  "luminance": 0.02601
}

Semantic roles & 50–950 ramp

primary
#2D177B
secondary
#97B03E
accent
#EB3CC5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2D177B

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

Preview Lab → · Contrast checker → · Palette generator →

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