#402A5A

Closest named color: Space Cadet (#2B2D42). oklch(33.5% 0.085 303.3), rgb(64, 42, 90).

Aa

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

About this color

#402A5A is a dark, moderately saturated purple. In OKLCH its lightness is 34%, its chroma 0.085 and its hue 303°. Its hue sits between the warm and cool halves of the wheel. The nearest named color is Space Cadet (#2B2D42), ΔE 0.060 away. White text reads best on it, at 12.37:1.

Hue familyPurples
Lightnessdark (34%)
Chromamoderately saturated (0.085)
Temperaturein between
Nearest nameSpace Cadet (#2B2D42)
Black text1.69:1
White text12.37:1

Values

HEX#402A5A
RGBrgb(64, 42, 90)
HSLhsl(267, 36%, 26%)
OKLCHoklch(33.5% 0.085 303.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 #402A5A 12.37:1 AAA Lc -101.5 Preferred for body text
Black text on #402A5A 1.69:1 Fails Lc 0.0 Not readable
#402A5A text on white 12.37:1 AAA Lc 98.0 Preferred for body text
#402A5A text on black 1.69: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

    #ECE7F4

    oklch(93.6% 0.018 303.4)

  3. Step 200

    200

    #DED4ED

    oklch(88.6% 0.036 303.8)

  4. Step 300

    300

    #C9B7E3

    oklch(80.9% 0.064 303.6)

  5. Step 400

    400

    #AE91D5

    oklch(70.8% 0.102 303.5)

  6. Step 500

    500

    #9A74C9

    oklch(63.1% 0.13 303.5)

  7. Step 600

    600

    #855BB6

    oklch(55.6% 0.141 303.4)

  8. Step 700

    700

    #714A9D

    oklch(49.1% 0.132 303.6)

  9. Step 800

    800

    #5C3E7F

    oklch(42.8% 0.108 303.5)

  10. Step 900

    900 (this color)

    #402A5A

    oklch(33.5% 0.085 303.3)

  11. Step 950

    950

    #2C1F3C

    oklch(27% 0.055 303.6)

Export this scale for Tailwind in the Tailwind colors tool

#402A5A 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)#1B345C0.062
Deuteranopia (no green cones)#2134590.056
Tritanopia (no blue cones)#3B333D0.065
Achromatopsia (no color)#3434340.085

Harmonies

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

Complementary

The opposite hue (180°).

  • #402A5A

    #402A5A

    oklch(33.5% 0.085 303.3)

  • #2F3D00

    #2F3D00

    oklch(33.5% 0.082 122.9)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402A5A

    #402A5A

    oklch(33.5% 0.085 303.3)

  • #293262

    #293262

    oklch(33.6% 0.085 273)

  • #502449

    #502449

    oklch(33.6% 0.085 333.6)

Open the analogous palette in the generator

Split complementary

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

  • #402A5A

    #402A5A

    oklch(33.5% 0.085 303.3)

  • #433500

    #433500

    oklch(33.5% 0.068 92.5)

  • #024321

    #024321

    oklch(33.6% 0.085 153.3)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402A5A

    #402A5A

    oklch(33.5% 0.085 303.3)

  • #522C00

    #522C00

    oklch(33.5% 0.077 62.3)

  • #00413A

    #00413A

    oklch(33.7% 0.06 183)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402A5A

    #402A5A

    oklch(33.5% 0.085 303.3)

  • #5A2318

    #5A2318

    oklch(33.5% 0.084 33)

  • #2F3D00

    #2F3D00

    oklch(33.5% 0.082 122.9)

  • #003E49

    #003E49

    oklch(33.5% 0.059 214.1)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

Use #402A5A 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.