CSS named color
WhiteSmoke #F5F5F5
WhiteSmoke (CSS keyword whitesmoke) has the hex code #F5F5F5 and the RGB value rgb(245, 245, 245): a neutral near-white.
A very light neutral gray (#f5f5f5), slightly off-white. One of the most used named colors for subtle page, card and code-block backgrounds.
Color codes for WhiteSmoke
| CSS keyword | whitesmoke |
|---|---|
| HEX | #F5F5F5 |
| RGB | rgb(245, 245, 245) |
| HSL | hsl(0, 0%, 96%) |
| HWB | hwb(0 96% 4%) |
| OKLCH | oklch(97% 0 0) |
| CMYK (naive, no ICC profile) | cmyk(0%, 0%, 0%, 4%) |
| Decimal | 16,119,285 |
| Hue family | Whites and off-whites |
Contrast and accessibility
On whitesmoke, black text has a contrast ratio of 19.26:1 and passes AAA at any text size; white text reaches 1.09:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on whitesmoke | 19.26:1 | Pass | Pass | Pass | Pass | 100.1 |
| White text on whitesmoke | 1.09:1 | Fail | Fail | Fail | Fail | 0.0 |
| Whitesmoke text on white | 1.09:1 | Fail | Fail | Fail | Fail | 0.0 |
| Whitesmoke text on black | 19.26:1 | Pass | Pass | Pass | Pass | −101.3 |
Tints and shades
Each step mixes whitesmoke with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, whitesmoke, white 25%) in CSS.
Tints (mixed with white)
- 5%
#f6f6f6 - 15%
#f7f7f7 - 25%
#f8f8f8 - 35%
#f9f9f9 - 45%
#fafafa - 55%
#fbfbfb - 65%
#fcfcfc - 75%
#fdfdfd - 85%
#fefefe - 95%
#ffffff
Shades (mixed with black)
- 5%
#e9e9e9 - 15%
#d0d0d0 - 25%
#b8b8b8 - 35%
#9f9f9f - 45%
#878787 - 55%
#6e6e6e - 65%
#565656 - 75%
#3d3d3d - 85%
#252525 - 95%
#0c0c0c
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, whitesmoke's complementary color is #F5F5F5 (close to whitesmoke), its analogous colors are #F5F5F5 and #F5F5F5, and its triadic partners are #F5F5F5 and #F5F5F5. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #f5f5f5 |
| Analogous | −30°, +30° | #f5f5f5#f5f5f5 |
| Triadic | +120°, +240° | #f5f5f5#f5f5f5 |
| Split-complementary | +150°, +210° | #f5f5f5#f5f5f5 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
WhiteSmoke is close to neutral: its OKLCH chroma is only 0.000, so its temperature comes from context. It has no perceptible hue.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Nearest CSS named colors
| Color | HEX | ΔE OK |
|---|---|---|
| aliceblue | #f0f8ff | 1.4 |
| ghostwhite | #f8f8ff | 1.4 |
| seashell | #fff5ee | 1.5 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| neutral-100 | #f5f5f5 | 0.0 |
| stone-100 | #f5f5f4 | 0.1 |
| zinc-100 | #f4f4f5 | 0.3 |
Code snippets
.element {
color: whitesmoke;
background-color: #f5f5f5;
border-color: rgb(245 245 245);
outline-color: oklch(97% 0 0);
}<div class="bg-[#f5f5f5] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-whitesmoke: #f5f5f5;
}
/* then use bg-whitesmoke, text-whitesmoke, border-whitesmoke */import SwiftUI
extension Color {
static let whitesmoke = Color(red: 0.961, green: 0.961, blue: 0.961)
}import androidx.compose.ui.graphics.Color
val Whitesmoke = Color(0xFFF5F5F5)import 'package:flutter/material.dart';
const whitesmoke = Color(0xFFF5F5F5);<!-- res/values/colors.xml -->
<color name="whitesmoke">#F5F5F5</color>Frequently asked questions
- What is the hex code for whitesmoke?
- The hex code for whitesmoke is #F5F5F5. The same color is rgb(245, 245, 245), hsl(0, 0%, 96%) and oklch(97% 0 0), and in CSS you can also write the keyword whitesmoke directly.
- Is whitesmoke a warm or cool color?
- WhiteSmoke is close to neutral: its OKLCH chroma is only 0.000, so its temperature comes from context. It has no perceptible hue.
- What colors go with whitesmoke?
- Rotating the hue in OKLCH while keeping lightness and chroma, whitesmoke's complementary color is #F5F5F5 (close to whitesmoke), its analogous colors are #F5F5F5 and #F5F5F5, and its triadic partners are #F5F5F5 and #F5F5F5. For text on top, black gives the higher contrast.
- Can you use white text on whitesmoke?
- White text on whitesmoke has a contrast ratio of 1.09:1, which fails AA even for large text under WCAG 2.2. Black text reaches 19.26:1 and passes both AA and AAA. In APCA terms that is Lc 0.0 for white and Lc 100.1 for black.
- What is the RGB value of whitesmoke?
- WhiteSmoke is rgb(245, 245, 245): red 245, green 245 and blue 245 on the 0 to 255 scale, or 96.1%, 96.1% and 96.1%. As a decimal integer it is 16119285.
Last reviewed by Arielton Oberek.