HSL(242, 72%, 21%)
Blue — Blue color
Adjust Color
Color Information
Color Name
Blue
Color Family
Blue
Warm / Cool
🔵 Cool
Temperature
9000K
CSS Class
bg-[hsl(242,72%,21%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(242, 72%, 21%) | color: hsl(242, 72%, 21%) | |
| HEX | #120F5C | color: #120F5C | |
| RGB | rgb(18, 15, 92) | color: rgb(18, 15, 92) | |
| CMYK | cmyk(80%, 84%, 0%, 64%) | — | |
| HSV | hsv(242, 84%, 36%) | — | |
| HWB | hwb(242 6% 64%) | color: hwb(242 6% 64%) | |
| OKLCH | oklch(0.2446 0.1293 272.99) | color: oklch(0.2446 0.1293 272.99) | |
| Lab | lab(10.87 29.88 -44.62) | color: lab(10.87 29.88 -44.62) | |
| LCH | lch(10.87 53.7 303.81) | color: lch(10.87 53.7 303.81) |
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)
#111149 — rgb(17, 17, 73)
Deuteranopia (Green-blind)
#111145 — rgb(17, 17, 69)
Tritanopia (Blue-blind)
#123B37 — rgb(18, 59, 55)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(242, 72%, 21%);
text
color: hsl(242, 72%, 21%);
border
border: 2px solid hsl(242, 72%, 21%);
gradient light
background: linear-gradient(to right, hsl(242, 72%, 41%), hsl(242, 72%, 21%));
gradient dark
background: linear-gradient(to right, hsl(242, 72%, 21%), hsl(242, 72%, 1%))
hex
background-color: #120F5C;
tailwind
bg-[hsl(242,72%,21%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(242, 72%, 21%, 0.4);
css variable
--color-primary: hsl(242, 72%, 21%);
Related Colors
Use Cases for Blue
Frequently Asked Questions
What are all the color codes for HSL(242, 72%, 21%)?
HEX: #120F5C | RGB: rgb(18, 15, 92) | CMYK: 80%, 84%, 0%, 64% | HSV: 242°, 84%, 36%. Copy any format from the conversion table above.
What colors go well with #120F5C?
The complementary color is HSL(62, 72%, 21%). For a triadic harmony, use hues 242°, 2°, and 122°. For analogous combinations, try hues 212° and 272°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(242, 72%, 21%) in CSS?
As HSL: color: hsl(242, 72%, 21%); — As HEX: color: #120F5C; — As RGB: color: rgb(18, 15, 92); — Tailwind CSS: bg-[hsl(242,72%,21%)] — CSS variable: --color-primary: hsl(242, 72%, 21%);