#170542#170542

#170542 is a very dark, moderate violet. Relative luminance 0.007; OKLCH L 20.2% C 0.104 H 286.5°. Best body text is #FFFFFF at 18.47:1 contrast (WCAG AA passes).

Color values

HEX#170542
RGBrgb(23, 5, 66)
HSLhsl(258, 86%, 14%)
HSVhsv(258, 92%, 26%)
CMYKcmyk(65.2%, 92.4%, 0%, 74.1%)
CIE-LABlab(6.18, 26.70, -34.38)
CIE-LCHlch(6.18, 43.53, 307.83°)
OKLaboklab(20.24% 0.0297 -0.0998)
OKLCHoklch(20.24% 0.104 286.5)
XYZxyz(1.3907, 0.6840, 5.2119)
Luminance0.0068 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#170542 #304205
analogous
#051242 #170542 #360542
triadic
#170542 #421705 #054217
tetradic
#170542 #420512 #304205 #054236
square
#170542 #420512 #304205 #054236
split-complementary
#170542 #423605 #124205
monochromatic
#0A021C #0A021C #170542 #2B097B #3F0EB4

Accessibility & contrast

On white

18.47
#170542 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.14
#170542 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #170542
18.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##170542#FFFFFF#000000##FFFFFF
##1705421.0018.471.1418.47
#FFFFFF18.471.0021.001.00
#0000001.1421.001.0021.00
##FFFFFF18.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001544
Deuteranopia (green-blind)
#001241
Tritanopia (blue-blind)
#031724
Achromatopsia (no color)
#141414

Design tokens & code

CSS
--color: #170542;
/* rgb */ color: rgb(23, 5, 66);
/* oklch */ color: oklch(20.2% 0.104 286.5);
Tailwind
colors: {
  custom: {
    50: '#5b4877',
    500: '#170542',
    950: '#000000',
  },
}
SCSS
$custom: #170542;
$custom-light: #5b4877;
$custom-dark: #000000;
JSON
{
  "hex": "#170542",
  "rgb": {
    "r": 23,
    "g": 5,
    "b": 66
  },
  "hsl": {
    "h": 257.705,
    "s": 85.915,
    "l": 13.922
  },
  "oklch": {
    "l": 0.20243,
    "c": 0.10412,
    "h": 286.5
  },
  "luminance": 0.00684
}

Semantic roles & 50–950 ramp

primary
#170542
secondary
#658220
accent
#FC2CBF
background
#F5F4F7
surface
#E9E6ED
border
#C5C2C8
text
#040009
muted
#79777B

Preview Lab

Preview with #170542

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

Preview Lab → · Contrast checker → · Palette generator →

#170542 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva