#40198F#40198F

#40198F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.6% C 0.175 H 289.1°. Best body text is #FFFFFF at 11.98:1 contrast (WCAG AA passes).

Color values

HEX#40198F
RGBrgb(64, 25, 143)
HSLhsl(260, 70%, 33%)
HSVhsv(260, 83%, 56%)
CMYKcmyk(55.2%, 82.5%, 0%, 43.9%)
CIE-LABlab(22.89, 46.05, -57.53)
CIE-LCHlch(22.89, 73.69, 308.68°)
OKLaboklab(35.63% 0.0574 -0.1655)
OKLCHoklch(35.63% 0.175 289.1)
XYZxyz(7.4185, 3.7681, 26.3177)
Luminance0.0377 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40198F #688F19
analogous
#192D8F #40198F #7B198F
triadic
#40198F #8F4019 #198F40
tetradic
#40198F #8F192D #688F19 #198F7B
square
#40198F #8F192D #688F19 #198F7B
split-complementary
#40198F #8F7B19 #2D8F19
monochromatic
#110727 #29105B #40198F #5722C3 #7744DE

Accessibility & contrast

On white

11.98
#40198F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#40198F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40198F
11.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40198F#FFFFFF#000000##FFFFFF
##40198F1.0011.981.7511.98
#FFFFFF11.981.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#00348D
Tritanopia (blue-blind)
#203C55
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #40198f;
/* rgb */ color: rgb(64, 25, 143);
/* oklch */ color: oklch(35.6% 0.175 289.1);
Tailwind
colors: {
  custom: {
    50: '#7f5cb1',
    500: '#40198f',
    950: '#000000',
  },
}
SCSS
$custom: #40198f;
$custom-light: #7f5cb1;
$custom-dark: #000000;
JSON
{
  "hex": "#40198f",
  "rgb": {
    "r": 64,
    "g": 25,
    "b": 143
  },
  "hsl": {
    "h": 259.831,
    "s": 70.238,
    "l": 32.941
  },
  "oklch": {
    "l": 0.35632,
    "c": 0.17518,
    "h": 289.1
  },
  "luminance": 0.03768
}

Semantic roles & 50–950 ramp

primary
#40198F
secondary
#97BF44
accent
#ED3BB2
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40198F

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

Preview Lab → · Contrast checker → · Palette generator →

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