CSS named color
GhostWhite #F8F8FF
GhostWhite (CSS keyword ghostwhite) has the hex code #F8F8FF and the RGB value rgb(248, 248, 255): a near-white with a faint blue tint.
A white with a faint lavender-blue tint, cooler than white and snow. It is practically indistinguishable from white on most screens.
Color codes for GhostWhite
| CSS keyword | ghostwhite |
|---|---|
| HEX | #F8F8FF |
| RGB | rgb(248, 248, 255) |
| HSL | hsl(240, 100%, 99%) |
| HWB | hwb(240 97% 0%) |
| OKLCH | oklch(98.1% 0.009 286.2) |
| CMYK (naive, no ICC profile) | cmyk(3%, 3%, 0%, 0%) |
| Decimal | 16,316,671 |
| Hue family | Whites and off-whites |
Contrast and accessibility
On ghostwhite, black text has a contrast ratio of 19.86:1 and passes AAA at any text size; white text reaches 1.05: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 ghostwhite | 19.86:1 | Pass | Pass | Pass | Pass | 102.2 |
| White text on ghostwhite | 1.05:1 | Fail | Fail | Fail | Fail | 0.0 |
| Ghostwhite text on white | 1.05:1 | Fail | Fail | Fail | Fail | 0.0 |
| Ghostwhite text on black | 19.86:1 | Pass | Pass | Pass | Pass | −103.6 |
Tints and shades
Each step mixes ghostwhite with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, ghostwhite, white 25%) in CSS.
Tints (mixed with white)
- 5%
#f8f8ff - 15%
#f9f9ff - 25%
#fafaff - 35%
#fafaff - 45%
#fbfbff - 55%
#fcfcff - 65%
#fdfdff - 75%
#fdfdff - 85%
#fefeff - 95%
#ffffff
Shades (mixed with black)
- 5%
#ececf2 - 15%
#d3d3d9 - 25%
#bababf - 35%
#a1a1a6 - 45%
#88888c - 55%
#707073 - 65%
#575759 - 75%
#3e3e40 - 85%
#252526 - 95%
#0c0c0d
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, ghostwhite's complementary color is #F9F9F2 (close to floralwhite), its analogous colors are #F5F9FF and #FBF7FD, and its triadic partners are #FFF7F4 and #F3FBF7. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #f9f9f2 |
| Analogous | −30°, +30° | #f5f9ff#fbf7fd |
| Triadic | +120°, +240° | #fff7f4#f3fbf7 |
| Split-complementary | +150°, +210° | #fcf8f2#f6faf4 |
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?
GhostWhite is close to neutral: its OKLCH chroma is only 0.009, so its temperature comes from context. The faint 240° hue gives it a slightly cool cast.
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.
Code snippets
.element {
color: ghostwhite;
background-color: #f8f8ff;
border-color: rgb(248 248 255);
outline-color: oklch(98.1% 0.009 286.2);
}<div class="bg-[#f8f8ff] text-black">...</div>
/* or register it once in your CSS (Tailwind v4) */
@theme {
--color-ghostwhite: #f8f8ff;
}
/* then use bg-ghostwhite, text-ghostwhite, border-ghostwhite */import SwiftUI
extension Color {
static let ghostwhite = Color(red: 0.973, green: 0.973, blue: 1.000)
}import androidx.compose.ui.graphics.Color
val Ghostwhite = Color(0xFFF8F8FF)import 'package:flutter/material.dart';
const ghostwhite = Color(0xFFF8F8FF);<!-- res/values/colors.xml -->
<color name="ghostwhite">#F8F8FF</color>Frequently asked questions
- What is the hex code for ghostwhite?
- The hex code for ghostwhite is #F8F8FF. The same color is rgb(248, 248, 255), hsl(240, 100%, 99%) and oklch(98.1% 0.009 286.2), and in CSS you can also write the keyword ghostwhite directly.
- Is ghostwhite a warm or cool color?
- GhostWhite is close to neutral: its OKLCH chroma is only 0.009, so its temperature comes from context. The faint 240° hue gives it a slightly cool cast.
- What colors go with ghostwhite?
- Rotating the hue in OKLCH while keeping lightness and chroma, ghostwhite's complementary color is #F9F9F2 (close to floralwhite), its analogous colors are #F5F9FF and #FBF7FD, and its triadic partners are #FFF7F4 and #F3FBF7. For text on top, black gives the higher contrast.
- Can you use white text on ghostwhite?
- White text on ghostwhite has a contrast ratio of 1.05:1, which fails AA even for large text under WCAG 2.2. Black text reaches 19.86:1 and passes both AA and AAA. In APCA terms that is Lc 0.0 for white and Lc 102.2 for black.
- What is the RGB value of ghostwhite?
- GhostWhite is rgb(248, 248, 255): red 248, green 248 and blue 255 on the 0 to 255 scale, or 97.3%, 97.3% and 100.0%. As a decimal integer it is 16316671.
Last reviewed by Arielton Oberek.