#402840

Closest named color: Space Cadet (#2B2D42). oklch(31.6% 0.053 326.7), rgb(64, 40, 64).

Aa

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

About this color

#402840 is a dark, muted purple. In OKLCH its lightness is 32%, its chroma 0.053 and its hue 327°. Its hue sits between the warm and cool halves of the wheel. The nearest named color is Space Cadet (#2B2D42), ΔE 0.040 away. White text reads best on it, at 13.16:1.

Hue familyPurples
Lightnessdark (32%)
Chromamuted (0.053)
Temperaturein between
Nearest nameSpace Cadet (#2B2D42)
Black text1.59:1
White text13.16:1

Values

HEX#402840
RGBrgb(64, 40, 64)
HSLhsl(300, 23%, 20%)
OKLCHoklch(31.6% 0.053 326.7)

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 #402840 13.16:1 AAA Lc -102.6 Preferred for body text
Black text on #402840 1.59:1 Fails Lc 0.0 Not readable
#402840 text on white 13.16:1 AAA Lc 99.4 Preferred for body text
#402840 text on black 1.59: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 950.

  1. Step 50

    50

    #F9F4F8

    oklch(97.2% 0.007 332.1)

  2. Step 100

    100

    #F1E6F0

    oklch(93.6% 0.018 328.5)

  3. Step 200

    200

    #E6D2E5

    oklch(88.6% 0.034 327.4)

  4. Step 300

    300

    #D7B3D6

    oklch(80.9% 0.063 327)

  5. Step 400

    400

    #C28AC1

    oklch(70.7% 0.1 327.2)

  6. Step 500

    500

    #B16CB2

    oklch(63.1% 0.128 326.5)

  7. Step 600

    600

    #9C529D

    oklch(55.5% 0.139 326.8)

  8. Step 700

    700

    #864287

    oklch(49.1% 0.131 326.8)

  9. Step 800

    800

    #6D376D

    oklch(42.7% 0.107 327.2)

  10. Step 900

    900

    #583059

    oklch(37.7% 0.084 326.2)

  11. Step 950

    950 (this color)

    #402840

    oklch(31.6% 0.053 326.7)

Export this scale for Tailwind in the Tailwind colors tool

#402840 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)#262E410.049
Deuteranopia (no green cones)#2C313F0.045
Tritanopia (no blue cones)#412A310.030
Achromatopsia (no color)#3030300.053

Harmonies

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

Complementary

The opposite hue (180°).

  • #402840

    #402840

    oklch(31.6% 0.053 326.7)

  • #1F3922

    #1F3922

    oklch(31.6% 0.052 146.9)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402840

    #402840

    oklch(31.6% 0.053 326.7)

  • #352C4A

    #352C4A

    oklch(31.7% 0.054 297.1)

  • #472632

    #472632

    oklch(31.6% 0.052 357.3)

Open the analogous palette in the generator

Split complementary

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

  • #402840

    #402840

    oklch(31.6% 0.053 326.7)

  • #303514

    #303514

    oklch(31.5% 0.052 116.6)

  • #0A3B31

    #0A3B31

    oklch(31.8% 0.054 175.7)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402840

    #402840

    oklch(31.6% 0.053 326.7)

  • #3E300E

    #3E300E

    oklch(31.7% 0.053 86.3)

  • #02393F

    #02393F

    oklch(31.5% 0.053 206.6)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402840

    #402840

    oklch(31.6% 0.053 326.7)

  • #462A15

    #462A15

    oklch(31.5% 0.053 56.2)

  • #1F3922

    #1F3922

    oklch(31.6% 0.052 146.9)

  • #133649

    #133649

    oklch(31.7% 0.052 235.6)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

Use #402840 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.