#170540#170540

#170540 is a very dark, moderate violet. Relative luminance 0.007; OKLCH L 20.0% C 0.102 H 287.5°. Best body text is #FFFFFF at 18.55:1 contrast (WCAG AA passes).

Color values

HEX#170540
RGBrgb(23, 5, 64)
HSLhsl(258, 86%, 14%)
HSVhsv(258, 92%, 25%)
CMYKcmyk(64.1%, 92.2%, 0%, 74.9%)
CIE-LABlab(5.97, 25.88, -33.29)
CIE-LCHlch(5.97, 42.17, 307.86°)
OKLaboklab(19.99% 0.0305 -0.0969)
OKLCHoklch(19.99% 0.102 287.5)
XYZxyz(1.3328, 0.6608, 4.9068)
Luminance0.0066 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#170540 #2E4005
analogous
#051040 #170540 #340540
triadic
#170540 #401705 #054017
tetradic
#170540 #400510 #2E4005 #054034
square
#170540 #400510 #2E4005 #054034
split-complementary
#170540 #403405 #104005
monochromatic
#0A021C #0A021C #170540 #2B0979 #400EB2

Accessibility & contrast

On white

18.55
#170540 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.13
#170540 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #170540
18.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##170540#FFFFFF#000000##FFFFFF
##1705401.0018.551.1318.55
#FFFFFF18.551.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001542
Deuteranopia (green-blind)
#00123F
Tritanopia (blue-blind)
#051723
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #170540;
/* rgb */ color: rgb(23, 5, 64);
/* oklch */ color: oklch(20.0% 0.102 287.5);
Tailwind
colors: {
  custom: {
    50: '#5a4875',
    500: '#170540',
    950: '#000000',
  },
}
SCSS
$custom: #170540;
$custom-light: #5a4875;
$custom-dark: #000000;
JSON
{
  "hex": "#170540",
  "rgb": {
    "r": 23,
    "g": 5,
    "b": 64
  },
  "hsl": {
    "h": 258.305,
    "s": 85.507,
    "l": 13.529
  },
  "oklch": {
    "l": 0.19995,
    "c": 0.10155,
    "h": 287.5
  },
  "luminance": 0.00661
}

Semantic roles & 50–950 ramp

primary
#170540
secondary
#638120
accent
#FC2CBC
background
#F5F4F7
surface
#E9E6ED
border
#C5C2C8
text
#040008
muted
#79777B

Preview Lab

Preview with #170540

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

Preview Lab → · Contrast checker → · Palette generator →

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