#170840#170840

#170840 is a very dark, moderate violet. Relative luminance 0.007; OKLCH L 20.5% C 0.098 H 286.4°. Best body text is #FFFFFF at 18.34:1 contrast (WCAG AA passes).

Color values

HEX#170840
RGBrgb(23, 8, 64)
HSLhsl(256, 78%, 14%)
HSVhsv(256, 88%, 25%)
CMYKcmyk(64.1%, 87.5%, 0%, 74.9%)
CIE-LABlab(6.56, 24.32, -32.33)
CIE-LCHlch(6.56, 40.46, 306.94°)
OKLaboklab(20.47% 0.0276 -0.0936)
OKLCHoklch(20.47% 0.098 286.4)
XYZxyz(1.3653, 0.7259, 4.9177)
Luminance0.0073 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#170840 #314008
analogous
#081540 #170840 #330840
triadic
#170840 #401708 #084017
tetradic
#170840 #400815 #314008 #084033
square
#170840 #400815 #314008 #084033
split-complementary
#170840 #403308 #154008
monochromatic
#0A031B #0A031B #170840 #2B0F76 #3E16AD

Accessibility & contrast

On white

18.34
#170840 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#170840 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #170840
18.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##170840#FFFFFF#000000##FFFFFF
##1708401.0018.341.1518.34
#FFFFFF18.341.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001642
Deuteranopia (green-blind)
#00133F
Tritanopia (blue-blind)
#051824
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #170840;
/* rgb */ color: rgb(23, 8, 64);
/* oklch */ color: oklch(20.5% 0.098 286.4);
Tailwind
colors: {
  custom: {
    50: '#5a4975',
    500: '#170840',
    950: '#000000',
  },
}
SCSS
$custom: #170840;
$custom-light: #5a4975;
$custom-dark: #000000;
JSON
{
  "hex": "#170840",
  "rgb": {
    "r": 23,
    "g": 8,
    "b": 64
  },
  "hsl": {
    "h": 256.071,
    "s": 77.778,
    "l": 14.118
  },
  "oklch": {
    "l": 0.20475,
    "c": 0.09756,
    "h": 286.4
  },
  "luminance": 0.00726
}

Semantic roles & 50–950 ramp

primary
#170840
secondary
#677E25
accent
#F434C1
background
#F5F4F7
surface
#E9E7ED
border
#C5C3C8
text
#040108
muted
#79777B

Preview Lab

Preview with #170840

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

Preview Lab → · Contrast checker → · Palette generator →

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