#402E54

Closest named color: Space Cadet (#2B2D42). oklch(34% 0.068 304.9), rgb(64, 46, 84).

Aa

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

About this color

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

Hue familyPurples
Lightnessdark (34%)
Chromamuted (0.068)
Temperaturein between
Nearest nameSpace Cadet (#2B2D42)
Black text1.73:1
White text12.09:1

Values

HEX#402E54
RGBrgb(64, 46, 84)
HSLhsl(268, 29%, 25%)
OKLCHoklch(34% 0.068 304.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 #402E54 12.09:1 AAA Lc -101.1 Preferred for body text
Black text on #402E54 1.73:1 Fails Lc 0.0 Not readable
#402E54 text on white 12.09:1 AAA Lc 97.5 Preferred for body text
#402E54 text on black 1.73: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

    #F6F4F9

    oklch(97% 0.007 304.2)

  2. Step 100

    100

    #ECE8F2

    oklch(93.7% 0.014 304.1)

  3. Step 200

    200

    #DDD5E9

    oklch(88.5% 0.028 303.9)

  4. Step 300

    300

    #C8B9DC

    oklch(80.9% 0.051 304.7)

  5. Step 400

    400

    #AC94CA

    oklch(70.7% 0.082 304.7)

  6. Step 500

    500

    #9879BC

    oklch(63.1% 0.104 304.9)

  7. Step 600

    600

    #8361A8

    oklch(55.7% 0.113 305.1)

  8. Step 700

    700

    #6F5090

    oklch(49.2% 0.104 305.2)

  9. Step 800

    800

    #5A4275

    oklch(42.8% 0.086 304.7)

  10. Step 900

    900 (this color)

    #402E54

    oklch(34% 0.068 304.9)

  11. Step 950

    950

    #2B2137

    oklch(27% 0.042 304.6)

Export this scale for Tailwind in the Tailwind colors tool

#402E54 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)#2535550.047
Deuteranopia (no green cones)#2936530.044
Tritanopia (no blue cones)#3D343D0.050
Achromatopsia (no color)#3636360.068

Harmonies

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

Complementary

The opposite hue (180°).

  • #402E54

    #402E54

    oklch(34% 0.068 304.9)

  • #303E12

    #303E12

    oklch(34.1% 0.069 124.9)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402E54

    #402E54

    oklch(34% 0.068 304.9)

  • #2E345B

    #2E345B

    oklch(33.9% 0.069 275.5)

  • #4D2946

    #4D2946

    oklch(33.9% 0.069 334.5)

Open the analogous palette in the generator

Split complementary

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

  • #402E54

    #402E54

    oklch(34% 0.068 304.9)

  • #433702

    #433702

    oklch(34% 0.068 95)

  • #144228

    #144228

    oklch(34% 0.068 155.2)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402E54

    #402E54

    oklch(34% 0.068 304.9)

  • #502F0A

    #502F0A

    oklch(33.9% 0.069 63.9)

  • #00423C

    #00423C

    oklch(34.1% 0.06 184.7)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402E54

    #402E54

    oklch(34% 0.068 304.9)

  • #55291F

    #55291F

    oklch(33.8% 0.068 33.9)

  • #303E12

    #303E12

    oklch(34.1% 0.069 124.9)

  • #003F4B

    #003F4B

    oklch(33.9% 0.06 215.5)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

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