#040239#040239

#040239 is a very dark, moderate blue. Relative luminance 0.004; OKLCH L 16.5% C 0.102 H 269.8°. Best body text is #FFFFFF at 19.57:1 contrast (WCAG AA passes).

Color values

HEX#040239
RGBrgb(4, 2, 57)
HSLhsl(242, 93%, 12%)
HSVhsv(242, 96%, 22%)
CMYKcmyk(93%, 96.5%, 0%, 77.6%)
CIE-LABlab(3.29, 18.99, -32.65)
CIE-LCHlch(3.29, 37.77, 300.18°)
OKLaboklab(16.52% -0.0004 -0.1016)
OKLCHoklch(16.52% 0.102 269.8)
XYZxyz(0.8100, 0.3645, 3.8978)
Luminance0.0037 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040239 #373902
analogous
#021C39 #040239 #200239
triadic
#040239 #390402 #023904
tetradic
#040239 #39021C #373902 #023920
square
#040239 #39021C #373902 #023920
split-complementary
#040239 #392002 #1C3902
monochromatic
#02011E #02011E #040239 #080474 #0C06AF

Accessibility & contrast

On white

19.57
#040239 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.07
#040239 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040239
19.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040239#FFFFFF#000000##FFFFFF
##0402391.0019.571.0719.57
#FFFFFF19.571.0021.001.00
#0000001.0721.001.0021.00
##FFFFFF19.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000F3A
Deuteranopia (green-blind)
#000938
Tritanopia (blue-blind)
#00131E
Achromatopsia (no color)
#0C0C0C

Design tokens & code

CSS
--color: #040239;
/* rgb */ color: rgb(4, 2, 57);
/* oklch */ color: oklch(16.5% 0.102 269.8);
Tailwind
colors: {
  custom: {
    50: '#4e4770',
    500: '#040239',
    950: '#000000',
  },
}
SCSS
$custom: #040239;
$custom-light: #4e4770;
$custom-dark: #000000;
JSON
{
  "hex": "#040239",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 57
  },
  "hsl": {
    "h": 242.182,
    "s": 93.22,
    "l": 11.569
  },
  "oklch": {
    "l": 0.1652,
    "c": 0.1016,
    "h": 269.8
  },
  "luminance": 0.00365
}

Semantic roles & 50–950 ramp

primary
#040239
secondary
#797D1A
accent
#FF29F7
background
#F4F3F6
surface
#E7E5EC
border
#C3C1C7
text
#020007
muted
#78777A

Preview Lab

Preview with #040239

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

Preview Lab → · Contrast checker → · Palette generator →

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