#28126C

A color in the Violet family

#28126c is a color in the Violet family: RGB(40, 18, 108), HSL(255°, 71%, 25%), CMYK(63%, 83%, 0%, 58%). Closest named color: midnightblue. Contrast is 15.07:1 on white and 1.39:1 on black. See shades, harmonies and color-blindness simulation.

Open in Picker Generate Scheme

Color Codes

HEX#28126c
RGBrgb(40 18 108)
RGB (legacy)rgb(40, 18, 108)
RGB %rgb(16% 7% 42%)
HSLhsl(255 71% 25%)
HSV / HSBhsv(255, 83%, 42%)
HWBhwb(255 7% 58%)
CMYKcmyk(63%, 83%, 0%, 58%)
CIELAB (D50)lab(14.48 31 -48.98)
LCHlch(14.48 57.97 302.33)
OKLaboklab(0.2861 0.0346 -0.1379)
OKLCHoklch(0.2861 0.1422 284.08)
Decimal2626156

Properties

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

WCAG 2.2 Contrast Ratio

On White (#ffffff)
15.07:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.39: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.2 / 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: #28126c;
  --color-brand-oklch: oklch(28.61% 0.1422 284.08);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(40 18 108 / 50%); }
/* Tailwind CSS */
<div class="bg-[#28126c] text-[#28126c] border-[#28126c]">