HSL(228, 8%, 18%)
Grayish Black — Black color
Adjust Color
Color Information
Color Name
Grayish Black
Color Family
Black
Warm / Cool
🔵 Cool
Temperature
N/A
CSS Class
bg-[hsl(228,8%,18%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(228, 8%, 18%) | color: hsl(228, 8%, 18%) | |
| HEX | #2A2C32 | color: #2A2C32 | |
| RGB | rgb(42, 44, 50) | color: rgb(42, 44, 50) | |
| CMYK | cmyk(16%, 12%, 0%, 80%) | — | |
| HSV | hsv(225, 16%, 20%) | — | |
| HWB | hwb(225 17% 80%) | color: hwb(225 17% 80%) | |
| OKLCH | oklch(0.2936 0.0112 271.01) | color: oklch(0.2936 0.0112 271.01) | |
| Lab | lab(18.03 0.65 -4.17) | color: lab(18.03 0.65 -4.17) | |
| LCH | lch(18.03 4.22 278.86) | color: lch(18.03 4.22 278.86) |
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)
#2B2B31 — rgb(43, 43, 49)
Deuteranopia (Green-blind)
#2B2B30 — rgb(43, 43, 48)
Tritanopia (Blue-blind)
#2A2F2F — rgb(42, 47, 47)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(228, 8%, 18%);
text
color: hsl(228, 8%, 18%);
border
border: 2px solid hsl(228, 8%, 18%);
gradient light
background: linear-gradient(to right, hsl(228, 8%, 38%), hsl(228, 8%, 18%));
gradient dark
background: linear-gradient(to right, hsl(228, 8%, 18%), hsl(228, 8%, 0%))
hex
background-color: #2A2C32;
tailwind
bg-[hsl(228,8%,18%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(228, 8%, 18%, 0.4);
css variable
--color-primary: hsl(228, 8%, 18%);
Related Colors
Use Cases for Grayish Black
Frequently Asked Questions
What are all the color codes for HSL(228, 8%, 18%)?
HEX: #2A2C32 | RGB: rgb(42, 44, 50) | CMYK: 16%, 12%, 0%, 80% | HSV: 225°, 16%, 20%. Copy any format from the conversion table above.
What colors go well with #2A2C32?
The complementary color is HSL(48, 8%, 18%). For a triadic harmony, use hues 228°, 348°, and 108°. For analogous combinations, try hues 198° and 258°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(228, 8%, 18%) in CSS?
As HSL: color: hsl(228, 8%, 18%); — As HEX: color: #2A2C32; — As RGB: color: rgb(42, 44, 50); — Tailwind CSS: bg-[hsl(228,8%,18%)] — CSS variable: --color-primary: hsl(228, 8%, 18%);