#402A5C

Closest named color: Prussian Blue (#1D3557). oklch(33.7% 0.087 302.3), rgb(64, 42, 92).

Aa

White text reads best on this color (12.32:1).

About this color

#402A5C is a dark, moderately saturated purple. In OKLCH its lightness is 34%, its chroma 0.087 and its hue 302°. Its hue sits between the warm and cool halves of the wheel. The nearest named color is Prussian Blue (#1D3557), ΔE 0.063 away. White text reads best on it, at 12.32:1.

Hue familyPurples
Lightnessdark (34%)
Chromamoderately saturated (0.087)
Temperaturein between
Nearest namePrussian Blue (#1D3557)
Black text1.70:1
White text12.32:1

Values

HEX#402A5C
RGBrgb(64, 42, 92)
HSLhsl(266, 37%, 26%)
OKLCHoklch(33.7% 0.087 302.3)

Contrast

WCAG 2 contrast ratios are the conformance target: AA needs 4.5:1 for body text and 3:1 for large text, AAA needs 7:1. APCA Lc values are supplementary guidance from the WCAG 3 drafts.

PairWCAG 2ResultAPCAAPCA guidance
White text on #402A5C 12.32:1 AAA Lc -101.4 Preferred for body text
Black text on #402A5C 1.70:1 Fails Lc 0.0 Not readable
#402A5C text on white 12.32:1 AAA Lc 97.9 Preferred for body text
#402A5C text on black 1.70:1 Fails Lc 0.0 Not readable

Tints and shades

A 50–950 scale built in OKLCH: the hue is held, lightness follows a Tailwind v4-like curve, and every step is kept inside the sRGB gamut. This color sits at step 900.

  1. Step 50

    50

    #F6F4FA

    oklch(97% 0.008 301.4)

  2. Step 100

    100

    #ECE7F5

    oklch(93.6% 0.019 302.2)

  3. Step 200

    200

    #DDD4EE

    oklch(88.5% 0.037 301.4)

  4. Step 300

    300

    #C8B7E4

    oklch(80.8% 0.065 302.2)

  5. Step 400

    400

    #AD91D7

    oklch(70.8% 0.104 302.2)

  6. Step 500

    500

    #9974CC

    oklch(63.1% 0.133 302.1)

  7. Step 600

    600

    #845AB9

    oklch(55.5% 0.147 302.3)

  8. Step 700

    700

    #704A9F

    oklch(49.1% 0.135 302.3)

  9. Step 800

    800

    #5B3D81

    oklch(42.7% 0.112 302.3)

  10. Step 900

    900 (this color)

    #402A5C

    oklch(33.7% 0.087 302.3)

  11. Step 950

    950

    #2C1F3D

    oklch(27% 0.056 302.8)

Export this scale for Tailwind in the Tailwind colors tool

#402A5C with color blindness

Simulated with the Machado et al. (2009) model. ΔE is how far the color moves: below about 0.02 you would not notice a change.

VisionSeen asShift (ΔE)
Protanopia (no red cones)#1A345E0.062
Deuteranopia (no green cones)#20355B0.058
Tritanopia (no blue cones)#3B333E0.067
Achromatopsia (no color)#3535350.088

Harmonies

Hue rotations in OKLCH that keep this color's lightness and chroma.

Complementary

The opposite hue (180°).

  • #402A5C

    #402A5C

    oklch(33.7% 0.087 302.3)

  • #303D00

    #303D00

    oklch(33.6% 0.082 122.1)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402A5C

    #402A5C

    oklch(33.7% 0.087 302.3)

  • #283264

    #283264

    oklch(33.6% 0.088 272.3)

  • #50234B

    #50234B

    oklch(33.6% 0.088 331.7)

Open the analogous palette in the generator

Split complementary

The two hues beside the complement (150° and 210°).

  • #402A5C

    #402A5C

    oklch(33.7% 0.087 302.3)

  • #443500

    #443500

    oklch(33.6% 0.069 91.2)

  • #01431F

    #01431F

    oklch(33.6% 0.087 152.3)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402A5C

    #402A5C

    oklch(33.7% 0.087 302.3)

  • #532C00

    #532C00

    oklch(33.7% 0.078 61.5)

  • #00413A

    #00413A

    oklch(33.7% 0.06 183)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402A5C

    #402A5C

    oklch(33.7% 0.087 302.3)

  • #5C2218

    #5C2218

    oklch(33.7% 0.088 31.8)

  • #303D00

    #303D00

    oklch(33.6% 0.082 122.1)

  • #003F49

    #003F49

    oklch(33.8% 0.059 212.2)

Open the square palette in the generator

Palettes with this color

Curated palettes that contain a color within ΔE 0.04 (OKLab) of #402A5C, closest first.

Similar named colors

The eight closest entries in our named color list, with their ΔE distance.

Use #402A5C in your product

Turn it into light and dark UI roles checked for contrast, then export to Tailwind v4, shadcn/ui, CSS or design tokens.