#402273#402273

#402273 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.1% C 0.132 H 295.6°. Best body text is #FFFFFF at 12.39:1 contrast (WCAG AA passes).

Color values

HEX#402273
RGBrgb(64, 34, 115)
HSLhsl(262, 54%, 29%)
HSVhsv(262, 70%, 45%)
CMYKcmyk(44.3%, 70.4%, 0%, 54.9%)
CIE-LABlab(21.84, 33.51, -41.56)
CIE-LCHlch(21.84, 53.39, 308.88°)
OKLaboklab(34.09% 0.0568 -0.1187)
OKLCHoklch(34.09% 0.132 295.6)
XYZxyz(5.7801, 3.4717, 16.5819)
Luminance0.0347 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#402273 #557322
analogous
#222D73 #402273 #692273
triadic
#402273 #734022 #227340
tetradic
#402273 #73222D #557322 #227369
square
#402273 #73222D #557322 #227369
split-complementary
#402273 #736922 #2D7322
monochromatic
#0D0718 #261444 #402273 #5A30A2 #7747C9

Accessibility & contrast

On white

12.39
#402273 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#402273 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #402273
12.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##402273#FFFFFF#000000##FFFFFF
##4022731.0012.391.6912.39
#FFFFFF12.391.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003575
Deuteranopia (green-blind)
#003371
Tritanopia (blue-blind)
#323547
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #402273;
/* rgb */ color: rgb(64, 34, 115);
/* oklch */ color: oklch(34.1% 0.132 295.6);
Tailwind
colors: {
  custom: {
    50: '#7a5f9c',
    500: '#402273',
    950: '#000000',
  },
}
SCSS
$custom: #402273;
$custom-light: #7a5f9c;
$custom-dark: #000000;
JSON
{
  "hex": "#402273",
  "rgb": {
    "r": 64,
    "g": 34,
    "b": 115
  },
  "hsl": {
    "h": 262.222,
    "s": 54.362,
    "l": 29.216
  },
  "oklch": {
    "l": 0.34088,
    "c": 0.13163,
    "h": 295.6
  },
  "luminance": 0.03472
}

Semantic roles & 50–950 ramp

primary
#402273
secondary
#84A64B
accent
#DE4AA7
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#0A050E
muted
#7C797E

Preview Lab

Preview with #402273

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

Preview Lab → · Contrast checker → · Palette generator →

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