A five-color palette

Midnight: a navy, cornflower and mauve color palette

A midnight navy with a cornflower blue, a pale lavender, a purple and a lilac mauve. Its hex codes are #0a1a2e, #5d79de, #d9dbff, #714893, #d4b1e0. Open it in Recolor (recolor.page) to see it on a real web page, or copy the code below.

Last updated

#0a1a2eMidnight Blue
#5d79deRoyal Blue
#d9dbffLavender
#714893Rebecca Purple
#d4b1e0Plum
Computed with Recolor's own color code (culori, the WCAG 2 contrast ratio), November 12, 2026
HexNearest CSS nameOKLCHBlack text, AAWhite text, AA
#0a1a2eMidnight Blue (midnightblue)oklch(21.6% 0.045 255.0)1.20:1 fails17.50:1 passes
#5d79deRoyal Blue (royalblue)oklch(60.4% 0.156 269.6)5.26:1 passes4.00:1 fails
#d9dbffLavender (lavender)oklch(90.1% 0.049 282.8)15.53:1 passes1.35:1 fails
#714893Rebecca Purple (rebeccapurple)oklch(48.1% 0.123 307.7)3.05:1 fails6.88:1 passes
#d4b1e0Plum (plum)oklch(80.6% 0.075 317.4)11.16:1 passes1.88:1 fails

Using the palette

In Recolor the lightness and the order of the colors are meaning. On a light page #d9dbff, the lightest of the five, takes the background and #0a1a2e, the darkest, the text, and the page's other greys keep their place between the two; on a dark page the two swap. The other three take the page's colors in their order: the first of them its heaviest brand color, the next the one after. Reorder the swatches and the page reorders with them; mapping explains it, and the Tint choice that keeps a page's greys as they were. To keep text readable, the table above says whether black or white text reaches the WCAG AA ratio of 4.5:1 on each color.

The code below is what Recolor's own Export panel writes for this palette. The Tailwind block is a Tailwind v4 @theme block, and the Coolors link opens the same colors there. To see the palette on your own site first, follow previewing a palette on a real website.

The palette as code

CSS variables

CSS
:root {
  --color-1: #0a1a2e;
  --color-2: #5d79de;
  --color-3: #d9dbff;
  --color-4: #714893;
  --color-5: #d4b1e0;
  --color-primary: var(--color-1);
  --color-secondary: var(--color-2);
  --color-accent: var(--color-3);
}

Tailwind v4 @theme

CSS
@theme {
  --color-1: #0a1a2e;
  --color-2: #5d79de;
  --color-3: #d9dbff;
  --color-4: #714893;
  --color-5: #d4b1e0;
  --color-primary: #0a1a2e;
  --color-secondary: #5d79de;
  --color-accent: #d9dbff;
}

SCSS variables

SCSS
$color-1: #0a1a2e;
$color-2: #5d79de;
$color-3: #d9dbff;
$color-4: #714893;
$color-5: #d4b1e0;
$color-primary: $color-1;
$color-secondary: $color-2;
$color-accent: $color-3;

JSON

JSON
{
  "colors": [
    "#0a1a2e",
    "#5d79de",
    "#d9dbff",
    "#714893",
    "#d4b1e0"
  ]
}

Hex list

Text
#0a1a2e
#5d79de
#d9dbff
#714893
#d4b1e0

Coolors link

URL
https://coolors.co/0a1a2e-5d79de-d9dbff-714893-d4b1e0