Color Palette and The 56 Excel ColorIndex Colors
Color Palette and The 56 Excel ColorIndex Colors
Color Palette and the 56 Excel ColorIndex Colors Use a bookmarklet [ref] [ref]
to Change page background color
type in white, #eeeeee, or use
spacebar for your default color
Location: http://www.mvps.org/dmcritchie/excel/colors.htm
Home page: http://www.mvps.org/dmcritchie/excel/excel.htm
Page Color... (Frames Version)
Keywords: color, colorindex, colors, colour, colours, palette
This page contains some VBA macros and User Defined Functions. If you need assistance to installing either
please refer to Install a Macro or User Defined Function on my Formula page.
Scope of the Color Palette: Each workbook has it’s own palette. To change the default, change your book.xlt template for new workbooks.
When you change a color in the palette, it is changed for any element formatted with the color you changed, throughout the entire
workbook. To use the same custom color scheme in a set of workbooks, you can copy the color palette from one workbook to another.
For example, you can create a custom color palette that matches your company’s logo and image and then copy it into the workbooks
used in company presentations. You can also replace the default color palette that Microsoft Excel uses when it creates a new workbook.
dmcritchie.mvps.org/excel/colors.htm 1/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
Note: I have not had any desire to change my own colors so expect them to be unchanged. Correct interpretation of the 56 colors in the
ColorIndex is dependent upon the HTML wizard conversion on ColorIndex numbers. The RGB values definitely match color swatches.
The names for colors appears to have a wide variance; I am trying to find what Microsoft generally calls them if they are not named in
Excel.
The following colors has been used in Microsoft KB documentation probably for the first 16 colors:
Black, Blue, Cyan, Green, Magenta, Red, Yellow, White, Dk Blue, Dk Cyan, Dk Green, Dk Magenta, Dk Red, Dk Yellow, Dk Gray, Lt Gray
I have had to change some colors to match Microsoft usage from what I thought was normal usage. Assignment of name Gray may have
to be changed. Color6 and Color27 appear to both be Yellow on my system even after resetting colors (Tools --> Options).
It would be hard to compare the palettes between XL95 and XL97. The XL95 palette is arranged by index number and the XL97 palette
is arranged chromatically.
in VBA
Application.CommandBars("Fill Color").Visible = True ' -- 40 colors
Application.Dialogs.Item(xlDialogColorPalette).Show ' -- 56 colors
dmcritchie.mvps.org/excel/colors.htm 2/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
This table was NOT generated by the Internet Assistant Wizard for Microsoft Excel. You can find this add-in on
"http://www.microsoft.com/msoffice/freestuf/msexcel/index.htm" -->
Appearance of table redone 2000-12-09 in Excel 2000, I display 32,760 colors, Excel shows only 56 colors at any time. Following are
the defaults.
Text within some cells can be viewed easier by selecting an area with the mouse. zap colors Reset (F5)
[Color 26] [Color 26] #FF00FF #FF00FF 255 0 255 [Color 26]
[Color 27] [Color 27] #FFFF00 #FFFF00 255 255 0 [Color 27]
[Color 28] [Color 28] #00FFFF #00FFFF 0 255 255 [Color 28]
[Color 29] [Color 29] #800080 #800080 128 0 128 [Color 29]
[Color 30] [Color 30] #800000 #800000 128 0 0 [Color 30]
[Color 31] [Color 31] #008080 #008080 0 128 128 [Color 31]
[Color 32] [Color 32] #0000FF #0000FF 0 0 255 [Color 32]
[Color 33] [Color 33] #00CCFF #00CCFF 0 204 255 [Color 33]
[Color 34] [Color 34] #CCFFFF #CCFFFF 204 255 255 [Color 34]
[Color 35] [Color 35] #CCFFCC #CCFFCC 204 255 204 [Color 35]
[Color 36] [Color 36] #FFFF99 #FFFF99 255 255 153 [Color 36]
[Color 37] [Color 37] #99CCFF #99CCFF 153 204 255 [Color 37]
[Color 38] [Color 38] #FF99CC #FF99CC 255 153 204 [Color 38]
[Color 39] [Color 39] #CC99FF #CC99FF 204 153 255 [Color 39]
[Color 40] [Color 40] #FFCC99 #FFCC99 255 204 153 [Color 40]
[Color 41] [Color 41] #3366FF #3366FF 51 102 255 [Color 41]
[Color 42] [Color 42] #33CCCC #33CCCC 51 204 204 [Color 42]
[Color 43] [Color 43] #99CC00 #99CC00 153 204 0 [Color 43]
[Color 44] [Color 44] #FFCC00 #FFCC00 255 204 0 [Color 44]
[Color 45] [Color 45] #FF9900 #FF9900 255 153 0 [Color 45]
[Color 46] [Color 46] #FF6600 #FF6600 255 102 0 [Color 46]
[Color 47] [Color 47] #666699 #666699 102 102 153 [Color 47]
[Color 48] [Color 48] #969696 #969696 150 150 150 [Color 48]
[Color 49] [Color 49] #003366 #003366 0 51 102 [Color 49]
[Color 50] [Color 50] #339966 #339966 51 153 102 [Color 50]
[Color 51] [Color 51] #003300 #003300 0 51 0 [Color 51]
[Color 52] [Color 52] #333300 #333300 51 51 0 [Color 52]
[Color 53] [Color 53] #993300 #993300 153 51 0 [Color 53]
[Color 54] [Color 54] #993366 #993366 153 51 102 [Color 54]
[Color 55] [Color 55] #333399 #333399 51 51 153 [Color 55]
[Color 56] [Color 56] #333333 #333333 51 51 51 [Color 56]
Excel only recognizes names for Color 1 through 8 (Black, White, Red, Green, Blue, Yellow, Magenta, and Cyan). The colors 1-16 are widely
dmcritchie.mvps.org/excel/colors.htm 4/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
understood color names from the VGA color palette. Of the 56 colors only 40 colors appear on the palette. The 40 colors names indicated on the
Excel color palette (see below) are for descriptive purposes only.
The above table was created in Excel 2000 with help from the following macro, which includes Worksheet function HEX2DEC. The
table was converted to HTML using XL2HTML macro which (at least when done) does not convert embedded HTML code within a cell.
Sub colors56()
'57 colors, 0 to 56
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
Dim i As Long
Dim str0 As String, str As String
For i = 0 To 56
Cells(i + 1, 1).Interior.colorindex = i
Cells(i + 1, 1).Value = "[Color " & i & "]"
Cells(i + 1, 2).Font.colorindex = i
Cells(i + 1, 2).Value = "[Color " & i & "]"
str0 = Right("000000" & Hex(Cells(i + 1, 1).Interior.color), 6)
'Excel shows nibbles in reverse order so make it as RGB
str = Right(str0, 2) & Mid(str0, 3, 2) & Left(str0, 2)
'generating 2 columns in the HTML table
Cells(i + 1, 3) = "#" & str & "#" & str & ""
Cells(i + 1, 4).Formula = "=Hex2dec(""" & Right(str0, 2) & """)"
Cells(i + 1, 5).Formula = "=Hex2dec(""" & Mid(str0, 3, 2) & """)"
Cells(i + 1, 6).Formula = "=Hex2dec(""" & Left(str0, 2) & """)"
Cells(i + 1, 7) = "[Color " & i & ")"
Next i
done:
Application.Calculation = xlCalculationAutomatic 'pre XL97 xlAutomatic
Application.ScreenUpdating = True
End Sub
dmcritchie.mvps.org/excel/colors.htm 5/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
[Color 8] [Color 8] [Color 23] [Color 23] [Color 38] [Color 38] [Color 53] [Color 53]
[Color 9] [Color 9] [Color 24] [Color 24] [Color 39] [Color 39] [Color 54] [Color 54]
[Color 10] [Color 10] [Color 25] [Color 25] [Color 40] [Color 40] [Color 55] [Color 55]
[Color 11] [Color 11] [Color 26] [Color 26] [Color 41] [Color 41] [Color 56] [Color 56]
[Color 12] [Color 12] [Color 27] [Color 27] [Color 42] [Color 42]
[Color 13] [Color 13] [Color 28] [Color 28] [Color 43] [Color 43]
[Color 14] [Color 14] [Color 29] [Color 29] [Color 44] [Color 44]
1 53 52 51 49 11 55 56
9 46 12 10 14 5 47 16
3 45 43 50 42 41 13 48
7 44 6 4 8 33 54 15
38 40 36 35 34 37 39 2
additional 16 colors below are not shown on the 40 color toolbar palette but can be seen under Format, Cells, Pattern
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
Of the descriptive color names only those for index numbers 1 - 8 can be used in coding.
Black Brown Olive Green Dark Green Dark Teal Dark Blue Indigo Gray-80%
Dark Red Orange Dark Yellow Green Teal Blue Blue-Gray Gray-50%
Red Light Orange Lime Sea Green Aqua Light Blue Violet Gray-40%
Pink Gold Yellow Bright Green Turquoise Sky Blue Plum Gray-25%
Rose Tan Light Yellow Light Green Light Turquoise Pale Blue Lavender White
*to be updated* Excel 2000 names colors below (font not patterns) ******** *** ***** **
Periwinkle Plum+ Ivory Lite Turquoise Dark Purple Coral Ocean Blue Ice Blue
Dark Blue+ Pink+ Yellow+ Turquoise+ Violet+ Dark Red+ Teal+ Blue+
The default ColorIndex numbers can be found in HELP -->. Index --> ColorIndex Property
The colors names indicated on the color palette are for descriptive purposes only. Excel only recognizes names for Color 1 through 8
(Black, White, Red, Green, Blue, Yellow, Magenta, and Cyan).
A B C D E F G H I
1 Palette Sample % R G B Dec Calc Formula
2 black 100 00 00 00 0 0 =(100-C2)*256/100 You can use the Color Detector to see the RGB or
3 gray-80% 80 33 33 33 51 51.2 =(100-C3)*256/100 Hex color values by using it to click here or on the
4 gray-50% 50 80 80 80 128 128 =(100-C4)*256/100 color palette custom panel.
5 gray-40% 40 96 96 96 150 153.6 =(100-C5)*256/100
Click to view this page in grayscale [IE only], hit F5
6 gray-25% 25 C0 C0 C0 192 192 =(100-C6)*256/100
to restore. Background to White. Read more about
7 white 0 FF FF FF 256 256 =(100-C7)*256/100 bookmarklets.
-4 [>=5]General; [Red]-General; [Blue]General Entry Formatted Format -- GetFormat(cell) was used to display Format
-1 [>=5]General; [Red]-General; [Blue]General
-7 - 7.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
0 [>=5]General; [Red]-General; [Blue]General
2 [>=5]General; [Red]-General; [Blue]General -3 - 3.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
4 [>=5]General; [Red]-General; [Blue]General -2 - 2.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
5 [>=5]General; [Red]-General; [Blue]General -1 - 1.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
10 [>=5]General; [Red]-General; [Blue]General 0 0.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
txt [>=5]General; [Red]-General; [Blue]General
1 1.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
2 2.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
3 3 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
4 4 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
5 5.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
dmcritchie.mvps.org/excel/colors.htm 7/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
6 6.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
7 7.00 [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 42]General; [magenta]"Text:"@
Test Text:Test [Blue][>=5]0.00; [Red][<=2]-0.00; [Color 45]General; [magenta]"Text:"@
Also see my Formula page (starting at #cellformat). A generalized posting (2004-03-12) related to the above Cell Formatting, and to
Conditional Formatting, and Event macros. Two more examples of cell formatting:
[Red][>=5]General;[Color40][>=2]General;[Color10]General;[Color30]@
[Red][>0]"No";[Green]"Yes"
Conditional Formatting is covered on it's own page and can be used for color banding (like greenbar paper) [also see].
Changing colors of your DOS window may or may not work for you. I changed mine mainly in order to work with a specific
package so that the wording is black on white. This is easy to change but where there is no text the color will remain black.
(directions). Color can also be changed in the DOS window with the color command (Color F0), which can be put into your
Autoexec.bat -- to be effective you must reboot. The screen can still turn black upon exiting an application but can be
instantly reverted to white by typing Color.
dmcritchie.mvps.org/excel/colors.htm 8/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
The normal VGA assignments do not apply to Excel, but they do apply to older VGA monitors used on IBM mainframes
and DOS color assignments.
0 1 2 3 4 5 6 7
000000 000080 008000 008080 800000 800080 808000 C0C0C0
Black Navy Green Teal Maroon Purple Olive Silver
The assignments 0-15 are NOT those used by Excel ColorIndex
10 11 12 13 14 15
808080 0000FF 00FF00 00FFFF FF0000 FF00FF FFFF00 FFFFFF
Gray Blue Lime Cyan* Red Magenta* Yellow White
The Colors supported by Internet Explorer and most browsers in alphabetical order (#HTML):
AQUA, BLACK, BLUE, FUCHSIA, GRAY, GREEN, LIME, MAROON, NAVY, OLIVE, PURPLE, RED,
SILVER, TEAL, white (white), yellow [Select area with mouse to read]
The above colors are supported in the HTML 3.2 standard but have not been universally accepted by all browsers. In HTML
the colors are Fuchsia: #FF00FF instead of Magenta; and Aqua: #00FFFF instead of Cyan.
#gamma
The colors above and as fonts below are the choices of colors for Outlook Express and use the HTML names. Colors 0-6,
and 8 are very hard to see the difference looking straight at the screen on what would now be an old laptop.
You should be able to distinguish link colors, if you can’t, consider specifying your own default colors (or even overrides).
Click here to establish visited links below.
Possible link link #0000FF link #0000FF Your own unvisited link unvisited link
color changes visited #FF00FF visited #FF00FF link colors visted link visted link
dmcritchie.mvps.org/excel/colors.htm 9/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
To temporarily override a web pages visited links color you can use a bookmarklet which would be in effect until you
reload the page or hit F5 (Reset/Reload). The bookmarklet Links Visited to RED is particularly useful when viewing Google
search results. (Try it yourself, and Reset with F5. If you like it drag to links bar or a folder in your links bar, and do look at
my bookmarklets page.)
Since changing the actual colors is not possible, and would be ill advised, I’m not going to attempt to see if it is possible to
have eight distinguishable font colors for my laptop when within Outlook Express usage.
The Gamma can be changed for colors, and is somewhat equivalent from moving up or down when viewing the laptop
monitor, or by adjusting the tilt of the monitor. Most of problem distinguishing color pertains to fonts, backgrounds are okay
and bold text better than plain text. To adjust the colors on the monitor use: Control Panel, Settings, Display (monitor),
settings (tab), Advanced (button), Color (tab), and change the color. The gamma is seen as a color curve that you can distort
for each of the primary colors (Red, Green, Blue). Other Display settings.
Help Help Help Help Help Help Help Help Help Help Help (#Help)
Macros Macros Macros Macros Macros Macros Macros Macros Macros (#Macros)
ActiveCell.Font.ColorIndex = 17
ActiveCell.Font.Color = RGB(255, 0, 0)
Selection.Interior.ColorIndex = xlNone 'xlColorIndexAutomatic or xlColorIndexNone
Selection.Interior.ColorIndex = 5
Selection.Interior.Color = RGB(200, 250, 200)
Selection.Interior.Color = &Hc8efac8 'h=Hex, o=Octal anyone still use octal
ActiveCell.Font.Background = {xlAutomatic | xlOpaque | x1Transparent}
Workbooks("BOOK1.XLS").Worksheets("Sheet1").Activate
ActiveWindow.GridlineColor = RGB(255,0,0)
dmcritchie.mvps.org/excel/colors.htm 10/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
dmcritchie.mvps.org/excel/colors.htm 11/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
You can select an entire column without taking 6 seconds to process every cell in that column because the cells processed must also have
constants. Anything located by SpecialCells is by definition in the UsedRange. Anything outside the UsedRange could have color but
won't have constants.
Have been doing so many change events lately that I turned off events during the execution. There is a little risk here with EnableEvents
turned off should the subroutine fail for some reason.
Sub ClearConstantsFromColorCells()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim Cell As Range
On Error Resume Next 'In case no cells in selection
Application.EnableEvents = False
For Each Cell In Intersect(Selection, _
Cells.SpecialCells(xlConstants))
If Cell.Interior.ColorIndex >= 0 Then Cell.ClearContents
Next
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
You won't get too far in HTML using range.Interior.Color as above which is supposed to show RGB but shows them in the wrong
order and without leading zeros. HTML has the RGB components in the correct RGB order, so the following would be what you need to
dmcritchie.mvps.org/excel/colors.htm 12/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
equate to HTML color definitions. Most people get the HTML wrong because range.Interior.Color returns wrong order for RGB
components. For this reason the tables show the #prefix used in HTML colors to avoid all ambiguity.
Function showRGB(rcell)
Dim xColor As String
xColor = Right("000000" & Hex(rcell.Interior.Color), 6)
ShowRGB = Right(xColor, 2) & Mid(xColor, 3, 2) _
& Left(xColor, 2)
End Function
Function showColorIndex(rcell)
showColorIndex = rcell.Interior.ColorIndex
End Function
The shortcut key Ctrl+Alt+F9 forces a recalculation of *everything* in all open workbooks whether or not Excel
*thinks* recalculations are needed. Changing a format does not trigger cell recalculation, so you will have to force
this when you want the values to change.
The use of Volatile would also work but would probably have a severe impact on your use of Excel. the VBA
equivalent of the shortcut is
Application.CalculateFull ' in Excel 2000
Next cell
End Sub
Sub PutInteriorColor()
Selection.Interior.ColorIndex = gblColorIndex
End Sub
Sub SameInteriorAsA1()
Selection.Interior.ColorIndex = [A1].Interior.ColorIndex
End Sub
dmcritchie.mvps.org/excel/colors.htm 14/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
If the colors you want to test are due to Conditional Formatting then use the same kind of test that you used for Conditional Formatting,
and the results will be immediate (no recalculation needed) i.e.
=COUNTIF(D12:D16,TRUE)
=SUMIF(D12:D16,TRUE,E12:E16)
If the colors are not from C.F. you will have to use a User Defined Function to find this information and since formatting is not registered
as a cell change you will have to wait for a recalculation to occur to get a valid answer. You can but should not make the macro Volatile,
since by doing that you could bring your Excel to an extremely slow state. Examples follow in the next paragraph.
See my Functions for Determining Interior Color of Another Cell described earlier for RGB, ColorIndex, and HEX.
Chip Pearson has some additional color functions using a little different approach unfortunately for whatever reason he does not
provide (#cpcolorsx) examples of his Functions For Cell Colors:
The following examples obtain the colorindex from another cell which is best, because colorindex colors can be changed by changing the palette.
Interior, colorindex of
=cellcolorindex(A$3,0)
if you installed in your personal.xls workbook to be available to all workbooks, use
=personal.xls!cellcolorindex(A$3,0)
dmcritchie.mvps.org/excel/colors.htm 15/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
Font, colorindex of
=cellcolorindex(A$3,1)
To work with shading instead of colorindex use .pattern instead of .colorindex and rename functions accordingly. Specific
patterns include such name as: xlgray8, xlgrid, xlvertical
Processing Coloured Cells, Bob Phillips, informative text, and macro subroutines
Determining the Row color based on cell value in that row (#rowcolor)
Conditional Formatting introduced in Excel 97 is limited to 3 conditions. With more than 3 conditions a macro would be required, such
as shown below. Another kind of macro that you could use is an Event Macro. Note even if you have an Event macro you will probably
want a normal macro to fix things up ahead of time. A more complicated macro differentiating text values, numbers, and empty cells in
addition to ranges of numbers.
Sub ColorRowBasedOnCellValue()
'David McRitchie, 2001-01-17 programming -- Color row based on value
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range
For Each cell In Intersect(Selection, ActiveCell.EntireColumn, _
ActiveSheet.UsedRange)
Select Case cell.Value
Case Is >= 50
cell.EntireRow.Interior.colorindex = 20
Case Is >= 40
cell.EntireRow.Interior.colorindex = 37
Case Is >= 20
cell.EntireRow.Interior.colorindex = 38
Case Is >= 0
cell.EntireRow.Interior.colorindex = 36
Case Else
dmcritchie.mvps.org/excel/colors.htm 16/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
cell.EntireRow.Interior.colorindex = 44
End Select
Next cell
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
End Sub
Comments for the following code can be found below the macro DelCellsUp on another web page.
Sub DeleteRowsRedInColA()
'David McRitchie 2002-01-17
' http://www.mvps.org/dmcritchie/excel/colors.htm
'Will not find color due to Conditional Formatting
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
Dim rng As Range, ix As Long
Set rng = Intersect(Range("A:A"), ActiveSheet.UsedRange)
For ix = rng.Count To 1 Step -1
If rng.Item(ix).Interior.ColorIndex = 3 Then
rng.Item(ix).EntireRow.Delete
End If
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
RGB values are represented by 6 hex digits. The first pair of digits represents Red, the next Green, and the last Blue. The values range
from 0 to 255, or in hex from 00 to FF. Given a six hex digit representation in hex characters such as 00C0C8 as hex characters simply
use left, and mid to separate them the digit pairs. Look in HELP for more information about HEX2DEC and DEC2HEX. Suppose B14
dmcritchie.mvps.org/excel/colors.htm 17/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
had a Long (Binary) integer in it and you want 6 hex digits for RGB. HEX2DEC and DEC2HEX are part of the Statistical Analysis
Toolpak [menu] [list]
There are 256³ RGB colors (16,777,216) and only 56 colorindex colors in the palette; so a one to one match of each is not only
impossible, but the colors in the palette can be reassigned to different colors.
Conversion of Font color in Excel to a hex string for HTML (via VBA code) (#hexconvxl)
The following code was used in XL2HTMLx conversion of an Excel sheet to HTML. Note Excel appears to store binary values in
reverse order or perhaps this is just “big-endian” (main frames, 1234 order) vs. “little-endian” (most PCs, 4321 order).
xColor = Right("000000" & Hex(Selection.Cells(r, C).FONT.Color), 6)
xColor = "#" & Right(xColor, 2) & Mid(xColor, 3, 2) & Left(xColor, 2)
If xColor <> "#000000" Then _
x = "<font color=""" & xColor & """>" & x & "</font>"
Conversion of a single binary decimal number to decimal RGB components (WS formulas)
=RIGHT("000000" & DEC2HEX(B14),6)
If you have a character value such as 00C0C8 or you start from a Long (Binary) integer, your can incorporate the above formula into the
following
=HEX2DEC(Left(B15,2))
=HEX2DEC(MID(B15,3,2))
=HEX2DEC(MID(B15,5,2))
I have not provided for the possibility of 3-digit hex numbers in HTML like #333 #608 which are equivalent to #333333 and #660088,
simply because I would never create the values that way myself.
I also would never produce RGB(red,green,blue) strings for use in HTML and they are mostly done incorrectly (without quotes) in most
places that I see them used and harder to work with visually when coding or comparing source.
Cell Comments are Tool Tips so to change your default you must change your Windows default. To change only once cell comment
double-click on the border of the cell comment and make your changes.
Press [Save As] button then assign the scheme to something like Windows out of the box mmm dd, yyyyy (current date).
Press [Save As] button then assign your own name to the scheme i.e. “David 2000-06-22”, and all future changes would be made to
this scheme.
In the item: pull down, rather than pulling down you can simply place cursor in the box and then use the cursor to cycle up or down
through the choices. Select “Tool Tip” and make changes to font, fontsize, text color, background color as wanted. not sure if you
actually will change the fontname or not.
You can select parts of the windows shown which will change the item selected, but tool tips is not one of them, you have to use the pull
down.
My own settings show: red text, yellow background, 8 point, MS Sans Serif, non bold, non italic. (I'm not sure what they were
originally).
In Excel 2002 you can color individual worksheet tabs. Here is a tip from Jessica Kovalik in exceltip at Microsoft ’s Office site.
dmcritchie.mvps.org/excel/colors.htm 19/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
Select the sheets you want to color by holding down the CTRL key and clicking the tabs.
On the Format menu, point to Sheet, and then click Tab Color. You can also right-click the sheet tab and then click Tab Color.
Click the color you want, and click OK.
I believe the normal reason to color tabs is to provide an organization to them. You can sort sheet tabs with a macro. You can enhance
your sorted arrangement by preceding the sheet tab with some less conspicuous small letters prefixes. i.e.
k.FunctKeys, k.ShortCutKeys
If working with dates for sheetnames, spell the year out and place it first
2002-10, 2002-11, 2002-12, 2003-01
sort sheet tabs into alphabetical order in http://www.mvps.org/dmcritchie/excel/buildtoc.htm#sortallsheets
The main topic on that page is to create a Table of Contents with hyperlinks to the other sheets. Shorter versions with just
membernames can be found in buildtoc.htm. A builtin alternative to navigate to a sheet via the More Sheets dialog listing (also available
from a macro) is to right-click on a scrolling arrow in lower left corner, the sheets are listed in the same order as the worksheet tabs at the
bottom of your spreadsheet (another reason to sort your worksheets).
Sort sheets by color of sheet tab, by colorindex number, Chip Pearson's sortws.htm
There is one problem that I know of with the arrangement of sheet tabs. You will probably have trouble with Mail Merge if the
worksheet to be used in Mail Merge is not the first worksheet.
You can go through 90 worksheets very quickly using Ctrl+PageDn to go down through the worksheet tabs, or Ctrl+PageUp to backup
through the tabs. I prefer to use a couple of macros and toolbar buttons –
Printing the comment indicator by aligning a shape over the upper right corner of cells with comments. see Print Worksheet with
Comment Indicators (contextures.com)
dmcritchie.mvps.org/excel/colors.htm 20/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
You can install a button on your toolbar to hasten the process, it looks like a dripping paint can.
View --> customize --> toolbars --> custom --> format
select the dripping paint bucked, marked Fill Color and drag it to your toolbar (if not already there).
Pale color shading can be used to designate input areas, and can be expanded to different colors for input from different areas
(departments).
Formula results might be shown with a different text color, and the formulas themselves and other non-input areas such as
descriptions might be protected from accidental changes.
Cells with links will generally show up in blue or purple with underlining. Best not to change what people expect.
Highlight cells for review that you modified or find questionable. Change them back at a later time. Also see tracking in Highlight
changes.
Hex Color Chart for the HTML Resource Guide for a faster loading variation of Jacobson ’s hex chart by Jack Wilson.
[http://www.bitmedia.com/colors/] It ’s faster because it uses tables with BGCOLOR instead of a lot of bit maps. [ archived copy]
Color Chart at Alan Barasch ’s Excel site has a slider to change the background color so you can check combinations of cell colors in
foreground to varied background colors in HTML. Pretty neat. He also has a similar Font Color Chart (text background), and Color
Chart (page background) a slider to change cell background color. (Charts and sliders each have 216 colors) Works only in Internet
Explorer, but is one of the easiest to use.
dmcritchie.mvps.org/excel/colors.htm 21/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
Web colors - Wikipedia, the free encyclopedia, From Wikipedia, the free encyclopedia
If you are using Firefox for browsing HTML you might want to also install Colorzilla extension for working within Firefox –
Eyedropper (color sampler, status bar options), ColorPicker, Page Zoomer, DOM inspector (if present). More extensions on my Firefox
Customization (Notes) page.
Color Wheel Picker, is similar to Color Detector but works only on its page with a color wheel so you can pick your color (IE active-x
only)
Back To Font Web Color Picker, select your colors and create the styles to place into your HTML coding. Also see CSS (Style Sheets)
on other references on my Font page.
HTML Colors - Color picker, AMPsoft, displays the hex, dec and RGB values, via taskbar icon or hotkey (is not a detector)
Palette Grabber :: Firefox Add-ons, Creates a color palette for Photoshop, Paint Shop Pro, GIMP, Flash, Fireworks, Paint.NET, or OS X
based on the current page.
This formula was created to make the color video signal compatible with black and white monitors/receivers. Monochrome monitors are
still in use as professional viewfinders on many TV cameras, since they create a sharper image than one made from a color matrix. Posted
by Harald Staff, plus the reference below.
Poynton ’s Color FAQ, Charles Poynton [alt] [archive] -- see item #9.
Syd Allan: HTML Tag an Color Test Page, has a list of other sites with color information, and has color tables of colors used in
SAS.
Browsers ☷☷☷☷
Browsers Browsers Browsers Browsers Browsers Browsers Browsers Browsers (#browsers)
See information under Color Detector and other references to Firefox, Internet Explorer, and HTML on this page.
There are bookmarklets (JavaScript code) that are stored as bookmarks that can be run in all browsers, but specific bookmarklets may be limited to
one browser due to limitations in a browser. There are several webpages with bookmarklets that involve color at squarefree.com, specifically Color
Bookmarklets and Bookmarklets for Zapping Annoyances.
Related ☷☷☷☷
Related Related Related Related Related Related Related Related Related Related (#related)
Event macros, example for change event using Case statement makes use of colorindex and refers back to this page.
Excel to HTML conversions, macros XL2HTML, XL2HTMLx and other, along with references to other HTML materials, and conversions.
Font
Formula page, Custom Formatting (custom number formatting), and also seen above on this page.
Colorblind (#colorblind)
How do things look to colorblind people?
ColorBrewer, by Cindy Brewer some color schemes for color separations as on maps (qualitative), as on population densities (sequential), as
emphasis on low and high values as in ages (diverging). Shows whether good for color-blind, photocopy, LCD projector, CRT-friendly, printer
friendly. For what I tried, the choices are so distinct that I did't see any problems on my laptop (32 bit color) even though marked as not good
for laptops. [color choices, also see Jenks below] --- Maybe I can't find what I thought was there
Vischeck: VischeckURL, color blindness check of your designated web page (URL) as seen by someone with Deuteranope (a form of red/green
color deficit), Protanope (another form of red/green color deficit), Tritanope (a blue/yellow deficit- very rare). Look further into site and the
numbers are adjustable for further testing. The displays on this site use technology licensed by Stanford University.
Color Scheme Designer 3, Simulate color vision deficiency.
Changing Font color for certain words within a cell, Dave Peterson, macro, 2003-05-28 [also see Font page]
Color, Sorting on Color, not recommended, at least not in any Excel through Excel 2000, but the topic does come up.
A Color Picker Dialog Box, John Walkenbach, Tip49. An alternative to not being able to determine the current selected color in
the color palette dialog boxes (xlDialogColorPalette).
Coloring within Ranges, Examples
Color Palette Generator, degraeve, Enter the URL of an image to get a color palette (10 colors) that matches the image. Useful in
creating a website color palette that matches a key image to be used for a website. [referened by Favicon Generator]
Color Tools, links provided at Univ. Of Minnesota
Conditional Formatting was introduced with Excel 97 and is a terrific feature, but there is a limit of 3 conditional sets per cell
grouping (like 3 wishes). Conditional Formatting, while in effect for a cell, will override the text colors that can be produced for
numeric values by normal cell formatting.
Conversion to Grayscale, a chapter in a book available online about color Grokking the GIMP by Carey Bunks.
Jenks Natural Breaks, part of the Virtual Geography Department Project described in Cartography Working Group of the
Department of Geography, Dartmouth College.
Logos and Graphics into headers/footers, you can assign the top rows of your spreadsheet for use as headers to include logos, logos
in color, and to include fonts in color. Fonts are available only in one color in the actual headings and footings-- black. For footers
you are out of luck as far as alternatives to black.
Office 2007: Using Color in Excel and PowerPoint, 2007, Excel and PowerPoint provide a number of common colors for quick
access from the FILL buttons on the Ribbon. If you prefer to use a different color or a customized color from the dialog color box.
Security hardware encryption, terms for similar information: cryptography, encryption, stenography, digital watermarks
Restore Hyperlink Style, restore normal hyperlink colors and formatting
Rowliner «, Chip Pearson. RowLiner add-in allows you have Excel automatically draw row and/or column lines around the
active cell, making it easier to view rows and columns, especially when gridlines are not visible. But you lose the ability to use
undo (Ctrl+Z) with macros and with addins.
Setting Colors and Safe Colors in HTML, Dave Raggett's Introduction to CSS (Cascading Style Sheets)
Using Colors in Excel Charts, PTS Blog, Jon Peltier by Jon Peltier
Worksheet Change Events, shows changing color of cells upon Change.
dmcritchie.mvps.org/excel/colors.htm 25/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
File, Page Setup, Sheet, Print B&W — will remove interior color, and will print font, and borders in black. Print Preview shows
up same as Printed copy (in black and white).
Use of a template such as book.xlt and sheet.xlt
Use of Format, Style can seem like a template was used to set up colors, but can't find any such format. Format, Style, should be
normal and no shading
Colors are only missing on monitor, due to High Contrast Accessibility option. A variation of same problem: The fill color, the
fill pattern, or the line color of a WordArt or AutoShape object in an Office document does not change
Also see companion page – Colors as seen on Monitor, and in Preview and Print, which attempts to show what you might see.
You see a lot of gray (grey) on the sheet and you may see big page numbers. That would be page break Preview, eliminate with
Eliminate with View, Normal
Excel 2003 apply the Service Pack, can't find anything on printing problems, but have been told it fixes some kind of problem.
Always be sure to keep your software updated. Description of the Excel 2003 post-Service Pack 1 hotfix package: February 20,
2005. Though there is a scaling problem with margins print 1 pages wide by 1 pages tall.
dmcritchie.mvps.org/excel/colors.htm 26/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
Q163230 - Thick Borders May Not Be Printed in Low Printer Resolution (163230) -- When you print thick borders in Microsoft Excel,
the borders may be partially printed, or the borders may not be printed at all.
Q320531 -- OFF: Changes to Fill Color and Fill Pattern Are Not Displayed,
Incorrect/missing colors may occur with use of High Contrast under Display tab of Accessibility Options. Colors don't show on monitor
however, you may be able to see the changes in print preview and on a printed page. Also see Problems topic.
dmcritchie.mvps.org/excel/colors.htm 27/28
27/11/2020 Color Palette and the 56 Excel ColorIndex Colors
This page has many links, you may want to distinguish the links by clicking on the following bookmarklets:
highlight links (for IE, or use the Mozilla version of highlight links) providing a yellow background to all links, then use
int/ext links to distinguish internal links in Red font and External links in Blue font, Use F5 to RESET this page back to normal.
This page was introduced on July 12, 1998. (last update: 10/01/2020 01:52:22)
[My Excel Pages -- home] [INDEX to my site and the off-site pages I reference]
[Site Search -- Excel] [Go Back] [Return to TOP]
Please send your comments concerning this web page to: David McRitchie send email comments
dmcritchie.mvps.org/excel/colors.htm 28/28