#402B78

Closest named color: Dark Slate Blue (#483D8B). oklch(35.9% 0.125 291.4), rgb(64, 43, 120).

Aa

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

About this color

#402B78 is a dark, moderately saturated purple. In OKLCH its lightness is 36%, its chroma 0.125 and its hue 291°. Its hue sits between the warm and cool halves of the wheel. The nearest named color is Dark Slate Blue (#483D8B), ΔE 0.056 away. White text reads best on it, at 11.44:1.

Hue familyPurples
Lightnessdark (36%)
Chromamoderately saturated (0.125)
Temperaturein between
Nearest nameDark Slate Blue (#483D8B)
Black text1.83:1
White text11.44:1

Values

HEX#402B78
RGBrgb(64, 43, 120)
HSLhsl(256, 47%, 32%)
OKLCHoklch(35.9% 0.125 291.4)

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 #402B78 11.44:1 AAA Lc -99.8 Preferred for body text
Black text on #402B78 1.83:1 Fails Lc 7.9 Not readable
#402B78 text on white 11.44:1 AAA Lc 96.0 Preferred for body text
#402B78 text on black 1.83: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

    #F5F4FE

    oklch(97.1% 0.013 290.8)

  2. Step 100

    100

    #E9E7FB

    oklch(93.5% 0.027 290.5)

  3. Step 200

    200

    #D9D4FA

    oklch(88.6% 0.052 291.3)

  4. Step 300

    300

    #C1B6F9

    oklch(80.9% 0.094 291.7)

  5. Step 400

    400

    #A28DF6

    oklch(70.6% 0.151 291.2)

  6. Step 500

    500

    #8E6DF2

    oklch(63.2% 0.191 291.4)

  7. Step 600

    600

    #7A50E1

    oklch(55.7% 0.209 291.4)

  8. Step 700

    700

    #673FC3

    oklch(49.1% 0.194 291.5)

  9. Step 800

    800

    #54359E

    oklch(42.7% 0.161 291.7)

  10. Step 900

    900 (this color)

    #402B78

    oklch(35.9% 0.125 291.4)

  11. Step 950

    950

    #281D49

    oklch(27% 0.079 291.8)

Export this scale for Tailwind in the Tailwind colors tool

#402B78 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)#003B7A0.076
Deuteranopia (no green cones)#0038760.075
Tritanopia (no blue cones)#2F3D4D0.102
Achromatopsia (no color)#3A3A3A0.126

Harmonies

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

Complementary

The opposite hue (180°).

  • #402B78

    #402B78

    oklch(35.9% 0.125 291.4)

  • #3F4000

    #3F4000

    oklch(35.9% 0.079 110.8)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402B78

    #402B78

    oklch(35.9% 0.125 291.4)

  • #13387D

    #13387D

    oklch(35.9% 0.125 261.4)

  • #591F63

    #591F63

    oklch(35.8% 0.125 321.5)

Open the analogous palette in the generator

Split complementary

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

  • #402B78

    #402B78

    oklch(35.9% 0.125 291.4)

  • #503800

    #503800

    oklch(35.9% 0.074 81.7)

  • #094B00

    #094B00

    oklch(36% 0.119 141.3)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402B78

    #402B78

    oklch(35.9% 0.125 291.4)

  • #622B00

    #622B00

    oklch(35.9% 0.094 50.9)

  • #004938

    #004938

    oklch(36.1% 0.071 170.7)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402B78

    #402B78

    oklch(35.9% 0.125 291.4)

  • #70141E

    #70141E

    oklch(35.9% 0.125 21)

  • #3F4000

    #3F4000

    oklch(35.9% 0.079 110.8)

  • #00464A

    #00464A

    oklch(35.9% 0.061 201.3)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

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