Many system colors come in pairs, one for background and one for foreground. For example, COLOR_MENU and COLOR_MENUTEXT; COLOR_WINDOW and COLOR_WINDOWTEXT; COLOR_HIGHLIGHT and COLOR_HIGHLIGHTTEXT. More on these colors in a future blog entry.

But there is COLOR_DESKTOP and no COLOR_DESKTOPTEXT.

How does the desktop choose the icon label color?

It's not very exciting.

The COLOR_DESKTOP color is studied to see if it is mostly dark or mostly light. If mostly dark, then the icon text is white. If mostly light, then the icon text is black.

This works great if you don't have a wallpaper. If you do, then the desktop color doesn't typically correspond to the dominant color in your wallpaper, which may lead to a poor choice of black vs. white.

To remedy this, you can manually set the desktop color by going to the Display control panel and going to the Desktop tab. Change the desktop color to something dark to get white icon text and to something light to get black icon text.