Skip to content

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.

WhiteSmoke#F5F5F5

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

Color codes for WhiteSmoke
CSS keywordwhitesmoke
HEX#F5F5F5
RGBrgb(245, 245, 245)
HSLhsl(0, 0%, 96%)
HWBhwb(0 96% 4%)
OKLCHoklch(97% 0 0)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 0%, 4%)
Decimal16,119,285
Hue familyWhites 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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on whitesmoke19.26:1PassPassPassPass100.1
White text on whitesmoke1.09:1FailFailFailFail0.0
Whitesmoke text on white1.09:1FailFailFailFail0.0
Whitesmoke text on black19.26:1PassPassPassPass−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)

  1. 5%
    #f6f6f6
  2. 15%
    #f7f7f7
  3. 25%
    #f8f8f8
  4. 35%
    #f9f9f9
  5. 45%
    #fafafa
  6. 55%
    #fbfbfb
  7. 65%
    #fcfcfc
  8. 75%
    #fdfdfd
  9. 85%
    #fefefe
  10. 95%
    #ffffff

Shades (mixed with black)

  1. 5%
    #e9e9e9
  2. 15%
    #d0d0d0
  3. 25%
    #b8b8b8
  4. 35%
    #9f9f9f
  5. 45%
    #878787
  6. 55%
    #6e6e6e
  7. 65%
    #565656
  8. 75%
    #3d3d3d
  9. 85%
    #252525
  10. 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.

Color harmonies
HarmonyRotationColor
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

Nearest CSS named colors
ColorHEXΔE OK
aliceblue#f0f8ff1.4
ghostwhite#f8f8ff1.4
seashell#fff5ee1.5

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
neutral-100#f5f5f50.0
stone-100#f5f5f40.1
zinc-100#f4f4f50.3

Code snippets

CSS
.element {
  color: whitesmoke;
  background-color: #f5f5f5;
  border-color: rgb(245 245 245);
  outline-color: oklch(97% 0 0);
}
Tailwind CSS
<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 */
SwiftUI
import SwiftUI

extension Color {
  static let whitesmoke = Color(red: 0.961, green: 0.961, blue: 0.961)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Whitesmoke = Color(0xFFF5F5F5)
Flutter
import 'package:flutter/material.dart';

const whitesmoke = Color(0xFFF5F5F5);
Android XML
<!-- 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.