#040640#040640

#040640 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 18.4% C 0.105 H 268.2°. Best body text is #FFFFFF at 19.00:1 contrast (WCAG AA passes).

Color values

HEX#040640
RGBrgb(4, 6, 64)
HSLhsl(238, 88%, 13%)
HSVhsv(238, 94%, 25%)
CMYKcmyk(93.8%, 90.6%, 0%, 74.9%)
CIE-LABlab(4.75, 21.56, -35.34)
CIE-LCHlch(4.75, 41.40, 301.39°)
OKLaboklab(18.43% -0.0033 -0.1053)
OKLCHoklch(18.43% 0.105 268.2)
XYZxyz(1.0403, 0.5261, 4.8962)
Luminance0.0053 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040640 #403E04
analogous
#042440 #040640 #200440
triadic
#040640 #400406 #064004
tetradic
#040640 #400424 #403E04 #044020
square
#040640 #400424 #403E04 #044020
split-complementary
#040640 #402004 #244004
monochromatic
#02031D #02031D #040640 #080B7A #0B11B3

Accessibility & contrast

On white

19.00
#040640 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.11
#040640 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040640
19.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040640#FFFFFF#000000##FFFFFF
##0406401.0019.001.1119.00
#FFFFFF19.001.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF19.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001342
Deuteranopia (green-blind)
#000D3F
Tritanopia (blue-blind)
#001823
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040640;
/* rgb */ color: rgb(4, 6, 64);
/* oklch */ color: oklch(18.4% 0.105 268.2);
Tailwind
colors: {
  custom: {
    50: '#514876',
    500: '#040640',
    950: '#000000',
  },
}
SCSS
$custom: #040640;
$custom-light: #514876;
$custom-dark: #000000;
JSON
{
  "hex": "#040640",
  "rgb": {
    "r": 4,
    "g": 6,
    "b": 64
  },
  "hsl": {
    "h": 238,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.18426,
    "c": 0.10531,
    "h": 268.2
  },
  "luminance": 0.00526
}

Semantic roles & 50–950 ramp

primary
#040640
secondary
#817E1F
accent
#F729FE
background
#F4F4F7
surface
#E8E6ED
border
#C4C2C8
text
#030008
muted
#78777B

Preview Lab

Preview with #040640

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

Preview Lab → · Contrast checker → · Palette generator →

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