#28126D

A color in the Violet family

#28126d is a color in the Violet family: RGB(40, 18, 109), HSL(255°, 72%, 25%), CMYK(63%, 83%, 0%, 57%). Closest named color: midnightblue. Contrast is 15.03:1 on white and 1.4:1 on black. See shades, harmonies and color-blindness simulation.

Color Codes

HEX#28126d
RGBrgb(40 18 109)
RGB (legacy)rgb(40, 18, 109)
RGB %rgb(16% 7% 43%)
HSLhsl(255 72% 25%)
HSV / HSBhsv(255, 83%, 43%)
HWBhwb(255 7% 57%)
CMYKcmyk(63%, 83%, 0%, 57%)
CIELAB (D50)lab(14.58 31.26 -49.47)
LCHlch(14.58 58.52 302.29)
OKLaboklab(0.2873 0.0343 -0.1392)
OKLCHoklch(0.2873 0.1434 283.82)
Decimal2626157

Properties

Color ToneViolet
Closest named colormidnightblue ΔE 2.8
Closest web-safe color#330066
Hue255°
Saturation (HSL / HSV)72% / 83%
Lightness (HSL)25%
Brightness or Value (HSV)43%
Luminance (Rec.601 / Rec.709)14% / 11%
Relative luminance (WCAG)0.0199
Red / Green / Blue40 / 18 / 109

WCAG 2.2 Contrast Ratio

On White (#ffffff)
15.03:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.40: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 101.1 / 0 · As background with white / black text: Lc -104.1 / 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: #28126d;
  --color-brand-oklch: oklch(28.73% 0.1434 283.82);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(40 18 109 / 50%); }
/* Tailwind CSS */
<div class="bg-[#28126d] text-[#28126d] border-[#28126d]">