#402238

Closest named color: Space Cadet (#2B2D42). oklch(30% 0.057 337.6), rgb(64, 34, 56).

Aa

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

About this color

#402238 is a dark, muted purple. In OKLCH its lightness is 30%, its chroma 0.057 and its hue 338°. Its hue sits on the warm side of the wheel. The nearest named color is Space Cadet (#2B2D42), ΔE 0.049 away. White text reads best on it, at 13.96:1.

Hue familyPurples
Lightnessdark (30%)
Chromamuted (0.057)
Temperaturewarm
Nearest nameSpace Cadet (#2B2D42)
Black text1.50:1
White text13.96:1

Values

HEX#402238
RGBrgb(64, 34, 56)
HSLhsl(316, 31%, 19%)
OKLCHoklch(30% 0.057 337.6)

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 #402238 13.96:1 AAA Lc -103.5 Preferred for body text
Black text on #402238 1.50:1 Fails Lc 0.0 Not readable
#402238 text on white 13.96:1 AAA Lc 100.5 Preferred for body text
#402238 text on black 1.50: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

    #FAF3F8

    oklch(97.1% 0.01 335.5)

  2. Step 100

    100

    #F3E5EE

    oklch(93.6% 0.019 338.7)

  3. Step 200

    200

    #EAD0E2

    oklch(88.4% 0.037 337)

  4. Step 300

    300

    #DEB0D0

    oklch(80.8% 0.068 337.6)

  5. Step 400

    400

    #CC86B8

    oklch(70.7% 0.107 337.9)

  6. Step 500

    500

    #BD66A7

    oklch(63.1% 0.137 337.4)

  7. Step 600

    600

    #A84B92

    oklch(55.6% 0.15 337.4)

  8. Step 700

    700

    #903B7C

    oklch(49% 0.14 337.6)

  9. Step 800

    800

    #753265

    oklch(42.7% 0.115 337.5)

  10. Step 900

    900

    #5F2C52

    oklch(37.6% 0.091 337.9)

  11. Step 950

    950 (this color)

    #402238

    oklch(30% 0.057 337.6)

Export this scale for Tailwind in the Tailwind colors tool

#402238 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)#2329390.057
Deuteranopia (no green cones)#2A2E370.054
Tritanopia (no blue cones)#43232A0.028
Achromatopsia (no color)#2C2C2C0.058

Harmonies

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

Complementary

The opposite hue (180°).

  • #402238

    #402238

    oklch(30% 0.057 337.6)

  • #103622

    #103622

    oklch(29.9% 0.057 157.2)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402238

    #402238

    oklch(30% 0.057 337.6)

  • #362644

    #362644

    oklch(30.2% 0.056 307.9)

  • #462129

    #462129

    oklch(30.2% 0.057 7.3)

Open the analogous palette in the generator

Split complementary

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

  • #402238

    #402238

    oklch(30% 0.057 337.6)

  • #263312

    #263312

    oklch(30% 0.056 127.4)

  • #003633

    #003633

    oklch(30% 0.052 188.8)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402238

    #402238

    oklch(30% 0.057 337.6)

  • #362E05

    #362E05

    oklch(30.1% 0.057 97.7)

  • #003440

    #003440

    oklch(30% 0.054 218.5)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402238

    #402238

    oklch(30% 0.057 337.6)

  • #412809

    #412809

    oklch(30.2% 0.057 67.7)

  • #103622

    #103622

    oklch(29.9% 0.057 157.2)

  • #143049

    #143049

    oklch(30.1% 0.057 247.8)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

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