#28175F#28175F

#28175F is a dark, moderate violet. Relative luminance 0.019; OKLCH L 27.9% C 0.120 H 286.6°. Best body text is #FFFFFF at 15.24:1 contrast (WCAG AA passes).

Color values

HEX#28175F
RGBrgb(40, 23, 95)
HSLhsl(254, 61%, 23%)
HSVhsv(254, 76%, 37%)
CMYKcmyk(57.9%, 75.8%, 0%, 62.7%)
CIE-LABlab(14.90, 29.04, -39.92)
CIE-LCHlch(14.90, 49.37, 306.03°)
OKLaboklab(27.91% 0.0343 -0.1148)
OKLCHoklch(27.91% 0.12 286.6)
XYZxyz(3.2464, 1.8900, 11.0180)
Luminance0.0189 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#28175F #4E5F17
analogous
#172A5F #28175F #4C175F
triadic
#28175F #5F2817 #175F28
tetradic
#28175F #5F172A #4E5F17 #175F4C
square
#28175F #5F172A #4E5F17 #175F4C
split-complementary
#28175F #5F4C17 #2A5F17
monochromatic
#0A0619 #130B2E #28175F #3D2390 #512FC2

Accessibility & contrast

On white

15.24
#28175F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#28175F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #28175F
15.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##28175F#FFFFFF#000000##FFFFFF
##28175F1.0015.241.3815.24
#FFFFFF15.241.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002761
Deuteranopia (green-blind)
#00235E
Tritanopia (blue-blind)
#112A39
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #28175f;
/* rgb */ color: rgb(40, 23, 95);
/* oklch */ color: oklch(27.9% 0.120 286.6);
Tailwind
colors: {
  custom: {
    50: '#69568d',
    500: '#28175f',
    950: '#000000',
  },
}
SCSS
$custom: #28175f;
$custom-light: #69568d;
$custom-dark: #000000;
JSON
{
  "hex": "#28175f",
  "rgb": {
    "r": 40,
    "g": 23,
    "b": 95
  },
  "hsl": {
    "h": 254.167,
    "s": 61.017,
    "l": 23.137
  },
  "oklch": {
    "l": 0.2791,
    "c": 0.11981,
    "h": 286.6
  },
  "luminance": 0.0189
}

Semantic roles & 50–950 ramp

primary
#28175F
secondary
#81963C
accent
#E444BE
background
#F6F5F8
surface
#EBE9F0
border
#C6C5CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #28175F

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

Preview Lab → · Contrast checker → · Palette generator →

#28175F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva