#2A135E

A color in the Violet family

#2a135e is a color in the Violet family: RGB(42, 19, 94), HSL(258°, 66%, 22%), CMYK(55%, 80%, 0%, 63%). Closest named color: midnightblue. Contrast is 15.52:1 on white and 1.35:1 on black. See shades, harmonies and color-blindness simulation.

Open in Picker Generate Scheme

Color Codes

HEX#2a135e
RGBrgb(42 19 94)
RGB (legacy)rgb(42, 19, 94)
RGB %rgb(16% 7% 37%)
HSLhsl(258 66% 22%)
HSV / HSBhsv(258, 80%, 37%)
HWBhwb(258 7% 63%)
CMYKcmyk(55%, 80%, 0%, 63%)
CIELAB (D50)lab(13.59 27.24 -41.19)
LCHlch(13.59 49.39 303.48)
OKLaboklab(0.2744 0.0416 -0.116)
OKLCHoklch(0.2744 0.1233 289.71)
Decimal2757470

Properties

Color ToneViolet
Closest named colormidnightblue ΔE 4.6
Closest web-safe color#330066
Hue258°
Saturation (HSL / HSV)66% / 80%
Lightness (HSL)22%
Brightness or Value (HSV)37%
Luminance (Rec.601 / Rec.709)14% / 11%
Relative luminance (WCAG)0.0177
Red / Green / Blue42 / 19 / 94

WCAG 2.2 Contrast Ratio

On White (#ffffff)
15.52:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.35: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.9 / 0 · As background with white / black text: Lc -104.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: #2a135e;
  --color-brand-oklch: oklch(27.44% 0.1233 289.71);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(42 19 94 / 50%); }
/* Tailwind CSS */
<div class="bg-[#2a135e] text-[#2a135e] border-[#2a135e]">