#040227#040227

#040227 is a very dark, moderate blue. Relative luminance 0.002; OKLCH L 13.7% C 0.076 H 274.1°. Best body text is #FFFFFF at 20.13:1 contrast (WCAG AA passes).

Color values

HEX#040227
RGBrgb(4, 2, 39)
HSLhsl(243, 90%, 8%)
HSVhsv(243, 95%, 15%)
CMYKcmyk(89.7%, 94.9%, 0%, 84.7%)
CIE-LABlab(1.95, 9.54, -21.27)
CIE-LCHlch(1.95, 23.31, 294.16°)
OKLaboklab(13.75% 0.0055 -0.0763)
OKLCHoklch(13.75% 0.076 274.1)
XYZxyz(0.4379, 0.2157, 1.9376)
Luminance0.0022 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040227 #252702
analogous
#021227 #040227 #160227
triadic
#040227 #270402 #022704
tetradic
#040227 #270212 #252702 #022716
square
#040227 #270212 #252702 #022716
split-complementary
#040227 #271602 #122702
monochromatic
#03011D #03011D #040227 #0A0561 #10089B

Accessibility & contrast

On white

20.13
#040227 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.04
#040227 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040227
20.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040227#FFFFFF#000000##FFFFFF
##0402271.0020.131.0420.13
#FFFFFF20.131.0021.001.00
#0000001.0421.001.0021.00
##FFFFFF20.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000928
Deuteranopia (green-blind)
#000626
Tritanopia (blue-blind)
#000B13
Achromatopsia (no color)
#070707

Design tokens & code

CSS
--color: #040227;
/* rgb */ color: rgb(4, 2, 39);
/* oklch */ color: oklch(13.7% 0.076 274.1);
Tailwind
colors: {
  custom: {
    50: '#484761',
    500: '#040227',
    950: '#000000',
  },
}
SCSS
$custom: #040227;
$custom-light: #484761;
$custom-dark: #000000;
JSON
{
  "hex": "#040227",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 39
  },
  "hsl": {
    "h": 243.243,
    "s": 90.244,
    "l": 8.039
  },
  "oklch": {
    "l": 0.13748,
    "c": 0.07647,
    "h": 274.1
  },
  "luminance": 0.00216
}

Semantic roles & 50–950 ramp

primary
#040227
secondary
#686C18
accent
#FF29F3
background
#F4F4F5
surface
#E7E6EA
border
#C3C2C6
text
#010005
muted
#777779

Preview Lab

Preview with #040227

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

Preview Lab → · Contrast checker → · Palette generator →

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