Excel 2007 Bug in Custom Theme Colors

J

jasontferrell

You may have noticed that your custom theme colors have one display in
the Home Ribbon Tab, then another when they are actually implemented
in cells on your worksheet.

This is a bug in the way Microsoft handled the conversion of hue
values from degrees to 0-255 values. The error shows up in the narrow
colors on the HSL scale, notably orange, yellow, and cyan. If you
create a theme accent color of these values, you'll see that they
change in the GUI:
Orange=HSL(28,255,128) changes to yellow
Yellow=HSL(42,255,128) changes to green-yellow or chartreuse
Cyan=HSL(128,255,128) changes to slate blue or cornflower

Let's take yellow as an example. Create a custom theme color from the
Page Layout->Themes ribbon tab. Choose an accent color and, in the
Excel dialog box, enter a hue of 42. This displays a beautiful
yellow. When you click the theme colors box on the Home Ribbon Tab,
yellow appears in the dialog, but green-yellow appears in the cell
preview.
The code appears to scale up the hue to the degree format, then
displays the color as if it were a 0-255 format. 42*360/255=60.
60/255 is chartreuse, so that is the color that is displayed. If we
entered 60 in the 0-255 hue box, we would see what is displayed on the
screen, which is a hue in degrees of 60*360/255 = 85 degrees. 85 hue
degrees is chartreuse.

This code error is probably only in the custom theme colors, as a
color shift doesn't appear to occur in the standard themes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top