#402D40

Closest named color: Space Cadet (#2B2D42). oklch(32.7% 0.042 326.5), rgb(64, 45, 64).

Aa

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

About this color

#402D40 is a dark, muted purple. In OKLCH its lightness is 33%, its chroma 0.042 and its hue 326°. Its hue sits between the warm and cool halves of the wheel. The nearest named color is Space Cadet (#2B2D42), ΔE 0.039 away. White text reads best on it, at 12.59:1.

Hue familyPurples
Lightnessdark (33%)
Chromamuted (0.042)
Temperaturein between
Nearest nameSpace Cadet (#2B2D42)
Black text1.66:1
White text12.59:1

Values

HEX#402D40
RGBrgb(64, 45, 64)
HSLhsl(300, 17%, 21%)
OKLCHoklch(32.7% 0.042 326.5)

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 #402D40 12.59:1 AAA Lc -101.9 Preferred for body text
Black text on #402D40 1.66:1 Fails Lc 0.0 Not readable
#402D40 text on white 12.59:1 AAA Lc 98.5 Preferred for body text
#402D40 text on black 1.66: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

    #F7F4F7

    oklch(97% 0.005 325.6)

  2. Step 100

    100

    #EDE8ED

    oklch(93.6% 0.009 325.6)

  3. Step 200

    200

    #E0D5DF

    oklch(88.5% 0.018 328.5)

  4. Step 300

    300

    #CCBACC

    oklch(80.9% 0.032 325.9)

  5. Step 400

    400

    #B296B1

    oklch(70.7% 0.05 327.2)

  6. Step 500

    500

    #9E7C9E

    oklch(63% 0.064 326.3)

  7. Step 600

    600

    #896589

    oklch(55.6% 0.069 326.5)

  8. Step 700

    700

    #745474

    oklch(49.1% 0.064 326.5)

  9. Step 800

    800

    #5F455F

    oklch(42.8% 0.054 326.5)

  10. Step 900

    900 (this color)

    #402D40

    oklch(32.7% 0.042 326.5)

  11. Step 950

    950

    #2D222D

    oklch(26.9% 0.026 326.3)

Export this scale for Tailwind in the Tailwind colors tool

#402D40 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)#2C32410.037
Deuteranopia (no green cones)#30343F0.035
Tritanopia (no blue cones)#412F340.024
Achromatopsia (no color)#3333330.042

Harmonies

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

Complementary

The opposite hue (180°).

  • #402D40

    #402D40

    oklch(32.7% 0.042 326.5)

  • #263A28

    #263A28

    oklch(32.5% 0.041 147.1)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402D40

    #402D40

    oklch(32.7% 0.042 326.5)

  • #373048

    #373048

    oklch(32.7% 0.043 297.4)

  • #462B35

    #462B35

    oklch(32.6% 0.043 355.9)

Open the analogous palette in the generator

Split complementary

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

  • #402D40

    #402D40

    oklch(32.7% 0.042 326.5)

  • #33371E

    #33371E

    oklch(32.6% 0.041 116.2)

  • #1A3C34

    #1A3C34

    oklch(32.8% 0.043 176.2)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402D40

    #402D40

    oklch(32.7% 0.042 326.5)

  • #3E331A

    #3E331A

    oklch(32.6% 0.042 86.3)

  • #173B3F

    #173B3F

    oklch(32.8% 0.042 205.1)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402D40

    #402D40

    oklch(32.7% 0.042 326.5)

  • #452F1F

    #452F1F

    oklch(32.7% 0.042 56.7)

  • #263A28

    #263A28

    oklch(32.5% 0.041 147.1)

  • #1E3847

    #1E3847

    oklch(32.7% 0.042 235.3)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

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