HSL(204, 42%, 21%)
Blue — Blue color
Adjust Color
Color Information
Color Name
Blue
Color Family
Blue
Warm / Cool
🔵 Cool
Temperature
7000K
CSS Class
bg-[hsl(204,42%,21%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(204, 42%, 21%) | color: hsl(204, 42%, 21%) | |
| HEX | #1F3A4C | color: #1F3A4C | |
| RGB | rgb(31, 58, 76) | color: rgb(31, 58, 76) | |
| CMYK | cmyk(59%, 24%, 0%, 70%) | — | |
| HSV | hsv(204, 59%, 30%) | — | |
| HWB | hwb(204 12% 70%) | color: hwb(204 12% 70%) | |
| OKLCH | oklch(0.3355 0.0459 239.32) | color: oklch(0.3355 0.0459 239.32) | |
| Lab | lab(23.13 -4.21 -14.15) | color: lab(23.13 -4.21 -14.15) | |
| LCH | lch(23.13 14.76 253.43) | color: lch(23.13 14.76 253.43) |
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)
#2B2B48 — rgb(43, 43, 72)
Deuteranopia (Green-blind)
#292747 — rgb(41, 39, 71)
Tritanopia (Blue-blind)
#204443 — rgb(32, 68, 67)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(204, 42%, 21%);
text
color: hsl(204, 42%, 21%);
border
border: 2px solid hsl(204, 42%, 21%);
gradient light
background: linear-gradient(to right, hsl(204, 42%, 41%), hsl(204, 42%, 21%));
gradient dark
background: linear-gradient(to right, hsl(204, 42%, 21%), hsl(204, 42%, 1%))
hex
background-color: #1F3A4C;
tailwind
bg-[hsl(204,42%,21%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(204, 42%, 21%, 0.4);
css variable
--color-primary: hsl(204, 42%, 21%);
Related Colors
Use Cases for Blue
Frequently Asked Questions
What are all the color codes for HSL(204, 42%, 21%)?
HEX: #1F3A4C | RGB: rgb(31, 58, 76) | CMYK: 59%, 24%, 0%, 70% | HSV: 204°, 59%, 30%. Copy any format from the conversion table above.
What colors go well with #1F3A4C?
The complementary color is HSL(24, 42%, 21%). For a triadic harmony, use hues 204°, 324°, and 84°. For analogous combinations, try hues 174° and 234°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(204, 42%, 21%) in CSS?
As HSL: color: hsl(204, 42%, 21%); — As HEX: color: #1F3A4C; — As RGB: color: rgb(31, 58, 76); — Tailwind CSS: bg-[hsl(204,42%,21%)] — CSS variable: --color-primary: hsl(204, 42%, 21%);