#40268C#40268C

#40268C is a dark, vivid violet. Relative luminance 0.044; OKLCH L 36.9% C 0.158 H 287.7°. Best body text is #FFFFFF at 11.21:1 contrast (WCAG AA passes).

Color values

HEX#40268C
RGBrgb(64, 38, 140)
HSLhsl(255, 57%, 35%)
HSVhsv(255, 73%, 55%)
CMYKcmyk(54.3%, 72.9%, 0%, 45.1%)
CIE-LABlab(24.86, 38.73, -52.44)
CIE-LCHlch(24.86, 65.19, 306.45°)
OKLaboklab(36.92% 0.048 -0.1507)
OKLCHoklch(36.92% 0.158 287.7)
XYZxyz(7.5397, 4.3693, 25.2519)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40268C #728C26
analogous
#263F8C #40268C #73268C
triadic
#40268C #8C4026 #268C40
tetradic
#40268C #8C263F #728C26 #268C73
square
#40268C #8C263F #728C26 #268C73
split-complementary
#40268C #8C7326 #3F8C26
monochromatic
#140C2C #2A195C #40268C #5633BC #795AD2

Accessibility & contrast

On white

11.21
#40268C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#40268C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40268C
11.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40268C#FFFFFF#000000##FFFFFF
##40268C1.0011.211.8711.21
#FFFFFF11.211.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8F
Deuteranopia (green-blind)
#00388A
Tritanopia (blue-blind)
#224156
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #40268c;
/* rgb */ color: rgb(64, 38, 140);
/* oklch */ color: oklch(36.9% 0.158 287.7);
Tailwind
colors: {
  custom: {
    50: '#7d63af',
    500: '#40268c',
    950: '#000000',
  },
}
SCSS
$custom: #40268c;
$custom-light: #7d63af;
$custom-dark: #000000;
JSON
{
  "hex": "#40268c",
  "rgb": {
    "r": 64,
    "g": 38,
    "b": 140
  },
  "hsl": {
    "h": 255.294,
    "s": 57.303,
    "l": 34.902
  },
  "oklch": {
    "l": 0.36923,
    "c": 0.15817,
    "h": 287.7
  },
  "luminance": 0.0437
}

Semantic roles & 50–950 ramp

primary
#40268C
secondary
#9FB757
accent
#E147B9
background
#F8F6FA
surface
#EFEBF5
border
#CAC6CF
text
#0B0510
muted
#7C7A7F

Preview Lab

Preview with #40268C

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

Preview Lab → · Contrast checker → · Palette generator →

#40268C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva