#0C021F#0C021F

#0C021F is a very dark, moderate violet. Relative luminance 0.002; OKLCH L 13.8% C 0.063 H 295.9°. Best body text is #FFFFFF at 20.11:1 contrast (WCAG AA passes).

Color values

HEX#0C021F
RGBrgb(12, 2, 31)
HSLhsl(261, 88%, 6%)
HSVhsv(261, 94%, 12%)
CMYKcmyk(61.3%, 93.5%, 0%, 87.8%)
CIE-LABlab(1.99, 8.64, -14.88)
CIE-LCHlch(1.99, 17.21, 300.15°)
OKLaboklab(13.79% 0.0276 -0.057)
OKLCHoklch(13.79% 0.063 295.9)
XYZxyz(0.4206, 0.2205, 1.3165)
Luminance0.0022 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#0C021F #151F02
analogous
#02071F #0C021F #1B021F
triadic
#0C021F #1F0C02 #021F0C
tetradic
#0C021F #1F0207 #151F02 #021F1B
square
#0C021F #1F0207 #151F02 #021F1B
split-complementary
#0C021F #1F1B02 #071F02
monochromatic
#0B021D #0B021D #0C021F #220658 #390992

Accessibility & contrast

On white

20.11
#0C021F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.04
#0C021F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #0C021F
20.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##0C021F#FFFFFF#000000##FFFFFF
##0C021F1.0020.111.0420.11
#FFFFFF20.111.0021.001.00
#0000001.0421.001.0021.00
##FFFFFF20.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000720
Deuteranopia (green-blind)
#00071E
Tritanopia (blue-blind)
#07080F
Achromatopsia (no color)
#070707

Design tokens & code

CSS
--color: #0c021f;
/* rgb */ color: rgb(12, 2, 31);
/* oklch */ color: oklch(13.8% 0.063 295.9);
Tailwind
colors: {
  custom: {
    50: '#4c475a',
    500: '#0c021f',
    950: '#000000',
  },
}
SCSS
$custom: #0c021f;
$custom-light: #4c475a;
$custom-dark: #000000;
JSON
{
  "hex": "#0c021f",
  "rgb": {
    "r": 12,
    "g": 2,
    "b": 31
  },
  "hsl": {
    "h": 260.69,
    "s": 87.879,
    "l": 6.471
  },
  "oklch": {
    "l": 0.1379,
    "c": 0.06329,
    "h": 295.9
  },
  "luminance": 0.00221
}

Semantic roles & 50–950 ramp

primary
#0C021F
secondary
#4A6518
accent
#FE2AB5
background
#F4F4F5
surface
#E7E6E9
border
#C3C2C5
text
#010004
muted
#777779

Preview Lab

Preview with #0C021F

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

Preview Lab → · Contrast checker → · Palette generator →

#0C021F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva