Free Accessible CSS Gradient Generator

← All Colors
#F8F8FF Ghost White

Ghost White Hex Code #F8F8FF

Ghost White is a very light off-white with the hex code #F8F8FF. In RGB it is 248, 248, 255, and in HSL it is 240°, 100%, 99%. It is one of the 148 named colors in CSS, so you can write “ghostwhite” instead of the hex code.

HEX
#F8F8FF
RGB
rgb(248, 248, 255)
HSL
hsl(240, 100%, 99%)
HSV
hsv(240°, 3%, 100%)
CMYK
cmyk(3%, 3%, 0%, 0%)
CSS name
ghostwhite

CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.

About Ghost White

On a white background Ghost White has a contrast ratio of 1.06:1 (Fail), and on black 19.86:1 (AAA). Black text is the better choice on top of it.

It has almost no hue of its own, so it pairs comfortably with almost any accent color.

Near-white colors work well as backgrounds and surfaces. Their slight tint feels softer than pure white, which can look harsh across a large screen.

Shades and tints of Ghost White

Tints mix Ghost White with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.

Pairing Ghost White with an accent color

Ghost White has almost no hue of its own, so color schemes built from it would all look the same. A neutral works best as a background or text color beside an accent. This is how six accent colors contrast with Ghost White.

Ghost White contrast and accessibility

WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Ghost White scores against white and black.

Contrast of Ghost White with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 1.06:1 ✕ Fail ✕ Fail ✕ Fail ✕ Fail
Black (#000000) 19.86:1 ✓ Pass ✓ Pass ✓ Pass ✓ Pass
Aa White text on Ghost White1.06:1
Aa Black text on Ghost White19.86:1

Ghost White and color blindness

These are approximate previews of how Ghost White can look with the main types of color vision deficiency.

Protanopia #F7F9FF

Ghost White looks almost the same.

Deuteranopia #F6F8FF

Ghost White looks almost the same.

Tritanopia #F7F9FA

Ghost White looks almost the same.

Achromatopsia #F9F9F9

Ghost White looks almost the same.

Gradients with Ghost White

Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.

Ghost White to a lighter tint

background: linear-gradient(135deg, #f8f8ff 0%, #fcfcff 100%);

Ghost White to a darker shade

background: linear-gradient(135deg, #f8f8ff 0%, #636366 100%);

Ghost White to Dark Orchid

background: linear-gradient(135deg, #f8f8ff 0%, #9932cc 100%);

Colors similar to Ghost White

How each close match differs from Ghost White.

More white & cream colors →

Use Ghost White in code

CSS
.element {
  color: #f8f8ff;
  background-color: #f8f8ff;
  border-color: ghostwhite;   /* ghostwhite is a valid CSS color name */
}
CSS variable
:root {
  --color-ghost-white: #f8f8ff;
}
Tailwind
<!-- Tailwind arbitrary values -->
<div class="bg-[#f8f8ff] text-[#f8f8ff] border-[#f8f8ff]"></div>

/* Tailwind v4 theme color */
@theme {
  --color-ghost-white: #f8f8ff;
}

Ghost White questions

What is the hex code for Ghost White?

The hex code for Ghost White is #F8F8FF. In RGB that is rgb(248, 248, 255), and in HSL it is hsl(240, 100%, 99%).

Which colors go well with Ghost White?

Ghost White is a neutral color with almost no hue of its own, so it has no true complement and pairs with nearly any accent. The accents that contrast most strongly against it are Dark Orchid (5.39:1), Crimson (4.72:1), Royal Blue (4.58:1).

Should I use white or black text on Ghost White?

Black text. It has a contrast ratio of 19.86:1 against Ghost White, which is WCAG AAA. The other option scores 1.06:1.

Is Ghost White accessible as a text color on white?

No. Ghost White on white scores 1.06:1, which is below the WCAG minimum of 3:1 even for large text.

What are darker and lighter shades of Ghost White?

Mixing Ghost White with black gives #C6C6CC, #959599, #636366, #323233 (20% to 80% black). Mixing it with white gives #F9F9FF, #FBFBFF, #FCFCFF, #FEFEFF (20% to 80% white).

More color tools