#2A177B#2A177B

#2A177B is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.1% C 0.156 H 281.1°. Best body text is #FFFFFF at 13.93:1 contrast (WCAG AA passes).

Color values

HEX#2A177B
RGBrgb(42, 23, 123)
HSLhsl(251, 68%, 29%)
HSVhsv(251, 81%, 48%)
CMYKcmyk(65.9%, 81.3%, 0%, 51.8%)
CIE-LABlab(18.07, 38.39, -52.95)
CIE-LCHlch(18.07, 65.41, 305.94°)
OKLaboklab(31.09% 0.0299 -0.1528)
OKLCHoklch(31.09% 0.156 281.1)
XYZxyz(4.8353, 2.5347, 18.9695)
Luminance0.0254 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A177B #687B17
analogous
#17367B #2A177B #5C177B
triadic
#2A177B #7B2A17 #177B2A
tetradic
#2A177B #7B1736 #687B17 #177B5C
square
#2A177B #7B1736 #687B17 #177B5C
split-complementary
#2A177B #7B5C17 #367B17
monochromatic
#09051A #180D47 #2A177B #3C21AF #5333D9

Accessibility & contrast

On white

13.93
#2A177B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#2A177B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A177B
13.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A177B#FFFFFF#000000##FFFFFF
##2A177B1.0013.931.5113.93
#FFFFFF13.931.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.931.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2a177b;
/* rgb */ color: rgb(42, 23, 123);
/* oklch */ color: oklch(31.1% 0.156 281.1);
Tailwind
colors: {
  custom: {
    50: '#7057a2',
    500: '#2a177b',
    950: '#000000',
  },
}
SCSS
$custom: #2a177b;
$custom-light: #7057a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2a177b",
  "rgb": {
    "r": 42,
    "g": 23,
    "b": 123
  },
  "hsl": {
    "h": 251.4,
    "s": 68.493,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31091,
    "c": 0.1557,
    "h": 281.1
  },
  "luminance": 0.02535
}

Semantic roles & 50–950 ramp

primary
#2A177B
secondary
#9AB03E
accent
#EB3CCA
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2A177B

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

Preview Lab → · Contrast checker → · Palette generator →

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