Dyota's blog

Excel format colours

Excel custom format string colours

Excel's custom number format strings support colour prefixes — you can write [Red]0.00 or [Blue]#,##0 and the cell's content will render in that colour. Useful for quick conditional colouring without touching conditional formatting rules.

There are two ways to specify colours: named colours, and palette index colours.

Named colours

Only eight named colours are available:

That's the complete list. There are no others.

Palette index colours

Beyond the named set, you can reference Excel's legacy 56-colour palette by index: [Color1] through [Color56].

These map to the default workbook palette from the .xls era. In .xlsx files the palette is essentially fixed, but in older .xls files it can be overridden per workbook — so the same index might render differently in different files.

The table below is the default palette. Colours 1–16 are the most reliable, as they are hardwired in the spec. Note that several indices are genuine duplicates (e.g. Color25 mirrors Color11, Color26 mirrors Color7) — this aliasing is intentional, not an error.

Index Hex Name
Color1 #000000 Black
Color2 #FFFFFF White
Color3 #FF0000 Red
Color4 #00FF00 Bright Green
Color5 #0000FF Blue
Color6 #FFFF00 Yellow
Color7 #FF00FF Magenta
Color8 #00FFFF Cyan
Color9 #800000 Dark Red
Color10 #008000 Green
Color11 #000080 Dark Blue
Color12 #808000 Dark Yellow
Color13 #800080 Violet
Color14 #008080 Teal
Color15 #C0C0C0 Silver
Color16 #808080 Grey 50%
Color17 #9999FF Periwinkle
Color18 #993366 Plum
Color19 #FFFFCC Ivory
Color20 #CCFFFF Light Turquoise
Color21 #660066 Dark Purple
Color22 #FF8080 Coral
Color23 #0066CC Ocean Blue
Color24 #CCCCFF Ice Blue
Color25 #000080 Dark Blue (alias of Color11)
Color26 #FF00FF Pink (alias of Color7)
Color27 #FFFF00 Yellow (alias of Color6)
Color28 #00FFFF Turquoise (alias of Color8)
Color29 #800080 Purple (alias of Color13)
Color30 #800000 Dark Red (alias of Color9)
Color31 #008080 Teal (alias of Color14)
Color32 #0000FF Blue (alias of Color5)
Color33 #00CCFF Sky Blue
Color34 #CCFFFF Light Blue
Color35 #CCFFCC Light Green
Color36 #FFFF99 Light Yellow
Color37 #99CCFF Pale Blue
Color38 #FF99CC Pink
Color39 #CC99FF Lavender
Color40 #FFCC99 Peach
Color41 #3366FF Cornflower Blue
Color42 #33CCCC Aquamarine
Color43 #99CC00 Lime
Color44 #FFCC00 Gold
Color45 #FF9900 Orange
Color46 #FF6600 Dark Orange
Color47 #666699 Blue-Grey
Color48 #969696 Grey 40%
Color49 #003366 Dark Teal
Color50 #339966 Sea Green
Color51 #003300 Dark Green
Color52 #333300 Olive Green
Color53 #993300 Brown
Color54 #993366 Plum (alias of Color18)
Color55 #333399 Indigo
Color56 #333333 Grey 80%

Practical notes

The colour prefix only affects the cell's content — text, numbers, the rendered value. It does not colour the cell background.

Colour prefixes in format strings do not interact with conditional formatting rules. If a conditional format applies to the cell, the conditional format wins.

The range Color33–Color56 is where the more useful non-primary colours live: orange (Color45, Color46), gold (Color44), lime (Color43), and the darker navy and green tones in Color49–Color52.

Format strings colour the display value only. They have no effect on charts, pivot tables, or any downstream rendering that reads the underlying cell value rather than its formatted output.