#402A7B

Closest named color: Dark Slate Blue (#483D8B). oklch(36% 0.131 290.9), rgb(64, 42, 123).

Aa

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

About this color

#402A7B is a dark, moderately saturated purple. In OKLCH its lightness is 36%, its chroma 0.131 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.055 away. White text reads best on it, at 11.44:1.

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

Values

HEX#402A7B
RGBrgb(64, 42, 123)
HSLhsl(256, 49%, 32%)
OKLCHoklch(36% 0.131 290.9)

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 #402A7B 11.44:1 AAA Lc -99.7 Preferred for body text
Black text on #402A7B 1.83:1 Fails Lc 7.9 Not readable
#402A7B text on white 11.44:1 AAA Lc 95.9 Preferred for body text
#402A7B 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

    #E9E7FC

    oklch(93.6% 0.028 290.2)

  3. Step 200

    200

    #D8D4FB

    oklch(88.5% 0.053 290)

  4. Step 300

    300

    #C0B6FC

    oklch(80.9% 0.098 290.6)

  5. Step 400

    400

    #A28CFA

    oklch(70.6% 0.157 291)

  6. Step 500

    500

    #8D6BF7

    oklch(63.1% 0.2 290.7)

  7. Step 600

    600

    #794DE6

    oklch(55.6% 0.218 290.7)

  8. Step 700

    700

    #673CC8

    oklch(49.1% 0.204 291.1)

  9. Step 800

    800

    #5333A2

    oklch(42.6% 0.169 290.7)

  10. Step 900

    900 (this color)

    #402A7B

    oklch(36% 0.131 290.9)

  11. Step 950

    950

    #281C4B

    oklch(27% 0.084 291.6)

Export this scale for Tailwind in the Tailwind colors tool

#402A7B 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)#003B7E0.076
Deuteranopia (no green cones)#0038790.076
Tritanopia (no blue cones)#2E3D4E0.106
Achromatopsia (no color)#3A3A3A0.131

Harmonies

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

Complementary

The opposite hue (180°).

  • #402A7B

    #402A7B

    oklch(36% 0.131 290.9)

  • #3F4000

    #3F4000

    oklch(35.9% 0.079 110.8)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402A7B

    #402A7B

    oklch(36% 0.131 290.9)

  • #0E3880

    #0E3880

    oklch(36% 0.13 260.7)

  • #5A1E66

    #5A1E66

    oklch(36% 0.13 320.5)

Open the analogous palette in the generator

Split complementary

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

  • #402A7B

    #402A7B

    oklch(36% 0.131 290.9)

  • #513800

    #513800

    oklch(36% 0.074 80.6)

  • #0D4B00

    #0D4B00

    oklch(36% 0.118 140.8)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402A7B

    #402A7B

    oklch(36% 0.131 290.9)

  • #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.

  • #402A7B

    #402A7B

    oklch(36% 0.131 290.9)

  • #73101D

    #73101D

    oklch(36.1% 0.131 20.9)

  • #3F4000

    #3F4000

    oklch(35.9% 0.079 110.8)

  • #00474A

    #00474A

    oklch(36.2% 0.061 199.6)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

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