Excel has no single official “neutral color code”: neutral can mean white, black, or a shade of gray, depending on the design. A useful middle gray is #808080 (RGB 128, 128, 128); white is #FFFFFF and black is #000000. You can enter a color in Excel as RGB values, or use a hex value when the color picker provides that field.
What “neutral” means in Excel
Neutral is a design description, not a special Excel color setting or a unique built-in code. It generally refers to colors without a strong hue, such as black, white, and gray. Warm off-whites, beige, taupe, and cool grays are also often called neutral colors, even though they have subtle color undertones. That is why a request for “the neutral color” does not have one universally correct answer.
For spreadsheets, the right neutral depends on its job. A pale gray can separate a header or total row without competing with the numbers. Dark gray can provide text that feels softer than pure black. White is a clean background, while black is useful for strong text or borders. The code #808080 is a handy reference gray, but it can look too dark as a large cell fill and too light for small text on a white background.
It is also useful to distinguish a color code from a color name. “Gray” is a human-readable description; RGB and hexadecimal values specify exact digital color components. Excel may display a color swatch rather than its name, and the shade can look different on another monitor or under different display settings.
Common neutral hex and RGB values
Hex codes encode red, green, and blue components as pairs of hexadecimal digits. For example, #808080 means red 128, green 128, and blue 128. When all three components match, the resulting color is a shade of gray: lower values are darker and higher values are lighter.
#000000— RGB (0, 0, 0), black.#404040— RGB (64, 64, 64), dark gray.#808080— RGB (128, 128, 128), middle gray.#BFBFBF— RGB (191, 191, 191), light-to-medium gray.#D9D9D9— RGB (217, 217, 217), light gray often suitable for subtle fills.#F2F2F2— RGB (242, 242, 242), very pale gray.#FFFFFF— RGB (255, 255, 255), white.
These are examples, not an official Excel neutral palette. The pale grays are often more practical for table shading than middle gray because they leave dark text easy to read. For instance, a fill of #F2F2F2 can distinguish alternating rows while preserving a light, uncluttered sheet. If you need an exact brand or report color, use the approved design specification rather than choosing a close-looking swatch.
How to enter a neutral color in Excel for Windows
In Microsoft Excel for Microsoft 365 on Windows, you can set an exact color through the color picker. Select the cells or object first, then open the appropriate color menu. For a cell background, use the Fill Color arrow; for text, use the Font Color arrow. For a line or shape, select the object and open its formatting color controls.
- Select the cells, chart element, or shape you want to format.
- On the Home tab, open the Fill Color arrow or Font Color arrow, as appropriate.
- Choose More Colors, then open the Custom tab in the color dialog.
- Enter the red, green, and blue numbers, each from 0 to 255, and confirm with OK.
For #808080, enter 128 for red, 128 for green, and 128 for blue. If your Excel color dialog includes a Hex field, you can enter the hexadecimal value there; field availability and layout can vary by Excel build. If it shows only RGB fields, enter the three decimal components instead. Do not type the leading # into an RGB box.
On Excel for Mac, select the cells and use the color controls on the Home tab, then choose the option to define a custom color. The dialog layout and labels can differ from Windows, so look for RGB controls or a hexadecimal entry field rather than assuming the same dialog arrangement. Excel for the web also has a color picker, but its controls and available options can differ from the desktop app. If the web picker does not expose the exact input you need, open the workbook in desktop Excel to set the color precisely.
How Excel theme colors differ from fixed codes
Excel offers theme colors as well as standard and custom colors. Theme colors are connected to the workbook’s theme: choosing a theme color or one of its tints and shades can make formatting adapt when the workbook theme changes. Custom RGB colors, by contrast, specify a particular color value. They are useful when you need a repeatable exact shade, but they do not automatically change to match a new theme.
The theme color grid typically includes dark and light colors plus accent colors. A pale theme shade may look like a neutral gray, but it can be derived from a theme color and may shift when someone changes the theme. If a workbook is designed around a consistent visual system, theme colors can make coordinated changes easier. If an exact gray must remain the same across documents, specify its RGB value and keep that value documented.
Another point of confusion is the old indexed color palette used by some legacy Excel features and file formats. An index number is not the same thing as a universal hex code: its appearance can depend on the workbook’s palette or context. For ordinary formatting in current Excel, use the visible theme or custom color controls rather than relying on an unexplained palette number copied from an old guide.
Choosing a neutral for fills, text, and borders
Choose a neutral according to contrast, hierarchy, and the amount of area it covers. A color that works for a thin border may be overpowering as a full-page background. Likewise, a medium gray that looks distinct as a fill might be too low-contrast for small text.
- For a quiet cell fill: try a very light gray such as
#F2F2F2or#D9D9D9, then check that text and grid information remain clear. - For body text: use a very dark neutral, such as black or a near-black gray. Avoid light gray text on white for important values.
- For borders: use a restrained gray so the table structure is visible without making every cell edge dominant.
- For emphasis: reserve darker fills or stronger contrast for headings, totals, or key input cells, and apply the scheme consistently.
Contrast matters for readers with low vision and for people viewing a workbook on a dim screen or printed in grayscale. Color should not be the only way to communicate meaning. If gray shading marks required inputs, for example, add a label, border, or other visual cue so the instruction remains understandable when colors are difficult to distinguish or do not print accurately.
Using neutral colors consistently
A simple neutral system can make a workbook easier to scan. You might use white for ordinary data cells, a pale gray for alternating rows, a darker gray for column headings, and a near-black font throughout. Keep the number of shades limited and assign each shade a clear purpose. If every section uses a different gray without a reason, the formatting becomes harder to interpret rather than more helpful.
To apply a fill to selected cells, use the Fill Color control on the Home tab. For a data range that grows over time, converting the range to an Excel table can help keep table formatting consistent as rows are added. Table formatting is available through Home > Format as Table; choose a style with the level of shading you want, and adjust it if the preset style is too strong. For headings or totals outside a table, apply a consistent fill and font treatment manually.
For conditional formatting, neutral fills can distinguish values without making a sheet look like a warning dashboard. Select the range, then use Home > Conditional Formatting to create or edit a rule. Check the rule’s range and priority if colors appear in unexpected cells. A conditional-format color is controlled by the rule, so changing the ordinary fill of a cell may not change what is displayed while the rule applies.
Common problems and how to fix them
A color that appears wrong is not always caused by an incorrect code. First verify the value entered in each RGB box: each component must be between 0 and 255, and swapping red and blue will produce a different color. If a dialog offers a hex field, use six digits for the standard red-green-blue form, and follow the field’s instructions about whether to include the # symbol.
- The cells still show another color: check whether conditional formatting is overriding the normal cell fill, or whether the selected cells include only part of the range you intended to format.
- The color changes when the workbook theme changes: the cells may use a theme color or tint rather than a fixed custom RGB value.
- The gray looks different on another screen: display calibration, brightness, and surrounding colors affect perception. Compare the numeric code, not just the on-screen appearance.
- The printed page looks different: printer settings, paper, and grayscale output can change how a shade appears. Use print preview and a test page for important reports.
One common misconception is that an HTML hex code is a special Excel formula or that typing it into a cell will format that cell. It is only a way to describe a color. To apply it, use a supported color picker or an appropriate automation method; placing the text #808080 in a worksheet cell simply stores text unless you separately format the cell.
Frequently Asked Questions
What is the Excel code for gray?
There is no one Excel-only gray code. A standard middle gray is #808080, equivalent to RGB (128, 128, 128). Lighter choices such as #D9D9D9 may work better for subtle cell fills.
What is the best neutral color for an Excel background?
For a worksheet that should remain easy to read, white or a very pale gray is a practical starting point. The best choice depends on the text color, display conditions, and whether the sheet will be printed. Check contrast before applying a shade across a large area.
Can I paste a hex code directly into an Excel cell?
You can type a hex code into a cell as text, but that does not apply the color to the cell. Use the fill, font, border, or object color picker and enter the corresponding custom color values if the picker supports them.
How do I convert a hex color to RGB?
Read the hex value as three pairs: the first pair is red, the second green, and the third blue. For #D9D9D9, each pair is D9 in hexadecimal, which equals 217 in decimal, so the RGB value is (217, 217, 217).
Why does my neutral color change after changing the theme?
The color may be a theme color or a theme-derived tint. Theme-linked colors are designed to follow the workbook’s theme. To keep a particular shade fixed, choose a custom color and enter its RGB values, then verify it remains as intended after any theme changes.
Is #808080 readable as text on a white background?
It can be less readable than black or a darker gray, especially at small font sizes. For important labels and values, choose a darker text color and check the workbook at its normal viewing size rather than judging only from a zoomed-in view.
Related
- Excel Data Validation Lists: Setup, Tips, and Fixes
- Excel Group Keyboard Shortcut: Rows and Columns
- Excel Green Highlight Row and Column: How to Turn It On
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Insert a Checkbox in Microsoft Word: Two WaysTo insert a checkbox in Microsoft Word, use Developer > Check Box Content Control for a box readers…
- Autofill Weekday Dates in Excel and Skip the WeekendsTo autofill weekdays in Excel and skip Saturdays and Sundays, enter a starting date in A2, then put…
- Outlook Export Contacts: CSV Steps and Common FixesTo export Outlook contacts, open People and choose Manage contacts > Export contacts in new Outlook or Outlook…
- Auto Loan Amortization Schedule in Google SheetsYes—Google Sheets can create an auto loan amortization schedule that shows each monthly payment’s interest, principal, and remaining…
- Google Sheets IF Statement: Syntax and ExamplesIn Google Sheets, an IF statement uses the IF function to test a condition and return one result…
- How to Sort in Excel and Google SheetsTo sort data without separating related values, select a cell in the complete table, open the sort controls,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.