#040027#040027

#040027 is a very dark, moderate blue. Relative luminance 0.002; OKLCH L 13.0% C 0.082 H 275.3°. Best body text is #FFFFFF at 20.30:1 contrast (WCAG AA passes).

Color values

HEX#040027
RGBrgb(4, 0, 39)
HSLhsl(246, 100%, 8%)
HSVhsv(246, 100%, 15%)
CMYKcmyk(89.7%, 100%, 0%, 84.7%)
CIE-LABlab(1.56, 10.34, -21.88)
CIE-LCHlch(1.56, 24.20, 295.29°)
OKLaboklab(13.02% 0.0075 -0.0813)
OKLCHoklch(13.02% 0.082 275.3)
XYZxyz(0.4162, 0.1723, 1.9304)
Luminance0.0017 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040027 #232700
analogous
#000F27 #040027 #170027
triadic
#040027 #270400 #002704
tetradic
#040027 #27000F #232700 #002717
square
#040027 #27000F #232700 #002717
split-complementary
#040027 #271700 #0F2700
monochromatic
#03001F #03001F #040027 #0A0064 #1100A1

Accessibility & contrast

On white

20.30
#040027 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.03
#040027 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040027
20.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040027#FFFFFF#000000##FFFFFF
##0400271.0020.301.0320.30
#FFFFFF20.301.0021.001.00
#0000001.0321.001.0021.00
##FFFFFF20.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000728
Deuteranopia (green-blind)
#000426
Tritanopia (blue-blind)
#000A12
Achromatopsia (no color)
#060606

Design tokens & code

CSS
--color: #040027;
/* rgb */ color: rgb(4, 0, 39);
/* oklch */ color: oklch(13.0% 0.082 275.3);
Tailwind
colors: {
  custom: {
    50: '#484661',
    500: '#040027',
    950: '#000000',
  },
}
SCSS
$custom: #040027;
$custom-light: #484661;
$custom-dark: #000000;
JSON
{
  "hex": "#040027",
  "rgb": {
    "r": 4,
    "g": 0,
    "b": 39
  },
  "hsl": {
    "h": 246.154,
    "s": 100,
    "l": 7.647
  },
  "oklch": {
    "l": 0.13016,
    "c": 0.08162,
    "h": 275.3
  },
  "luminance": 0.00172
}

Semantic roles & 50–950 ramp

primary
#040027
secondary
#666F14
accent
#FF29E9
background
#F4F3F5
surface
#E7E5EA
border
#C3C1C6
text
#010005
muted
#777779

Preview Lab

Preview with #040027

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

Preview Lab → · Contrast checker → · Palette generator →

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