#0C021A

A color in the Violet family

#0c021a is a color in the Violet family: RGB(12, 2, 26), HSL(265°, 86%, 5%), CMYK(54%, 92%, 0%, 90%). Closest named color: black. Contrast is 20.21:1 on white and 1.04:1 on black. See shades, harmonies and color-blindness simulation.

Color Codes

HEX#0c021a
RGBrgb(12 2 26)
RGB (legacy)rgb(12, 2, 26)
RGB %rgb(5% 1% 10%)
HSLhsl(265 86% 5%)
HSV / HSBhsv(265, 92%, 10%)
HWBhwb(265 1% 90%)
CMYKcmyk(54%, 92%, 0%, 90%)
CIELAB (D50)lab(1.7 6.07 -11.2)
LCHlch(1.7 12.74 298.44)
OKLaboklab(0.1321 0.0294 -0.0479)
OKLCHoklch(0.1321 0.0562 301.51)
Decimal786970

Properties

Color ToneViolet
Closest named colorblack ΔE 14.4
Closest web-safe color#000033
Hue265°
Saturation (HSL / HSV)86% / 92%
Lightness (HSL)5%
Brightness or Value (HSV)10%
Luminance (Rec.601 / Rec.709)3% / 2%
Relative luminance (WCAG)0.002
Red / Green / Blue12 / 2 / 26

WCAG 2.2 Contrast Ratio

On White (#ffffff)
20.21:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.04:1
AA Normal (4.5:1) · FailAA Large (3:1) · FailAAA Normal (7:1) · Fail
Aa Bb 123

APCA Contrast Lc (reference) — As text on white / black: Lc 105.8 / 0 · As background with white / black text: Lc -107.7 / 0

Lightness Scale (OKLCH 50–950)

Eleven steps that change only perceived lightness while keeping hue and chroma — ready to use as design-system color tokens.

Tints (mixed with white)

Shades (mixed with black)

Color Harmonies

Color Vision Deficiency Simulation

Estimated appearance of this color for people with color vision deficiencies (Machado 2009).

Similar Named Colors

Use in CSS

:root {
  --color-brand: #0c021a;
  --color-brand-oklch: oklch(13.21% 0.0562 301.51);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(12 2 26 / 50%); }
/* Tailwind CSS */
<div class="bg-[#0c021a] text-[#0c021a] border-[#0c021a]">