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
Accessibility (WCAG)
White text on color
Black text on color
Colored text
Contrast Ratios
AA Normal (4.5:1)
AA Large (3:1)
AAA Normal (7:1)
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
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
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%);