Skip to main content

#2A1B5C Midnight

The nearest named color to #2A1B5C is Midnight (#1E1B4B).

#2A1B5C

Midnight

What are the RGB, HSL, OKLCH and CMYK values of #2A1B5C?

HEX
#2A1B5C
RGB
rgb(42, 27, 92)
HSL
hsl(254, 55%, 23%)
OKLCH
oklch(28.5% 0.110 288)
CMYK
54, 71, 0, 64

#2A1B5C has a contrast ratio of 14.90:1 against white and 1.41:1 against black, so white is the better background for text in this color and light text reads best on it.

Contrast checker

Text color (rows) on background (columns), scored against WCAG 2.2. White and near-black text on this color.

WCAG contrast ratio for each text and background color combination
Text ↓ / Bg → #2A1B5C
#2A1B5C
Same color
White
14.9AAA
Near-black
1.2Fail

AAA ≥ 7:1 · AA ≥ 4.5:1 body text· AA18 ≥ 3:1 large text (18pt, or 14pt bold) only

Text that works on each color

  • White on #2A1B5C · 14.9:1

Tints and shades of #2A1B5C

Same hue and chroma in OKLCH, lighter to darker.

  1. #F4F4FF
  2. #D2CFFF
  3. #B3ABF9
  4. #958DD9
  5. #7970B9
  6. #5E549A
  7. #44397C
  8. #2A1B5C
  9. #180243

Colors that go with #2A1B5C

Six harmony rules built from this color. Open any in the Studio.

Color blindness check

About 1 in 12 men and 1 in 200 women see color differently. Simulated with the Machado (2009) model.

Typical
Deuteranopia

No green cones — the most common form. No two swatches become hard to tell apart here.

Export

Copy-paste code, or download the swatches.

:root {
  --midnight-1: #2A1B5C; /* Midnight */
}

Palettes, gradients and meshes with #2A1B5C

Items using this color or one perceptually close to it, closest first.

Palettes (28)

Gradients (3)

Mesh gradients (8)