HSL(252, 20%, 40%)

Blue — Blue color

Adjust Color

Color Information

Color Name

Blue

Color Family

Blue

Warm / Cool

🔵 Cool

Temperature

9000K

CSS Class

bg-[hsl(252,20%,40%)]

Color Conversions

Format Value CSS Usage
HSL hsl(252, 20%, 40%) color: hsl(252, 20%, 40%)
HEX #5A527A color: #5A527A
RGB rgb(90, 82, 122) color: rgb(90, 82, 122)
CMYK cmyk(26%, 33%, 0%, 52%)
HSV hsv(252, 33%, 48%)
HWB hwb(252 32% 52%) color: hwb(252 32% 52%)
OKLCH oklch(0.463 0.0646 292.88) color: oklch(0.463 0.0646 292.88)
Lab lab(37.14 12.72 -21.49) color: lab(37.14 12.72 -21.49)
LCH lch(37.14 24.97 300.62) color: lch(37.14 24.97 300.62)

Color Theory

Complementary

Triadic

Analogous

Tetradic (Square)

Split-Complementary

Accessibility (WCAG)

White text on color

Black text on color

Color on white bg

Colored text

Contrast Ratios

vs White 7.19:1
vs Black 2.92:1

AA Normal (4.5:1)

on White: PASS ✓ on Black: FAIL ✗

AA Large (3:1)

on White: PASS ✓ on Black: FAIL ✗

AAA Normal (7:1)

on White: PASS ✓

Best text on this color: white

Color Blindness Simulation

Protanopia (Red-blind)

#575670 — rgb(87, 86, 112)

Deuteranopia (Green-blind)

#57586E — rgb(87, 88, 110)

Tritanopia (Blue-blind)

#5A6967 — rgb(90, 105, 103)

Tints & Shades

Tints (Lighter →)

← Shades (Darker)

Saturation (0% → 100%)

CSS Code Snippets

background

background-color: hsl(252, 20%, 40%);

text

color: hsl(252, 20%, 40%);

border

border: 2px solid hsl(252, 20%, 40%);

gradient light

background: linear-gradient(to right, hsl(252, 20%, 60%), hsl(252, 20%, 40%));

gradient dark

background: linear-gradient(to right, hsl(252, 20%, 40%), hsl(252, 20%, 20%))

hex

background-color: #5A527A;

tailwind

bg-[hsl(252,20%,40%)]

box shadow

box-shadow: 0 4px 6px -1px hsl(252, 20%, 40%, 0.4);

css variable

--color-primary: hsl(252, 20%, 40%);

Related Colors

Use Cases for Blue

Corporate branding Trust signals Tech products Social media Primary buttons

Frequently Asked Questions

What are all the color codes for HSL(252, 20%, 40%)?

HEX: #5A527A | RGB: rgb(90, 82, 122) | CMYK: 26%, 33%, 0%, 52% | HSV: 252°, 33%, 48%. Copy any format from the conversion table above.

What colors go well with #5A527A?

The complementary color is HSL(72, 20%, 40%). For a triadic harmony, use hues 252°, 12°, and 132°. For analogous combinations, try hues 222° and 282°. See the Color Harmony section above for complete palettes with previews.

How do I use HSL(252, 20%, 40%) in CSS?

As HSL: color: hsl(252, 20%, 40%); — As HEX: color: #5A527A; — As RGB: color: rgb(90, 82, 122); — Tailwind CSS: bg-[hsl(252,20%,40%)] — CSS variable: --color-primary: hsl(252, 20%, 40%);