Many Wiki articles use colors. Unfortunately, the way colors are often specified in HTML, using RGB (for red green and blue) values, is no longer supported in the TechNet Wiki. Until this situation is corrected, a workaround is to specify colors by color name in the HTML. This Wiki article explains the issue: Wiki: Troubleshooting Color Issues In Your Wiki Articles

In addition, the issue was discussed in this forum thread: Table Formatting Lost After Edit

In HTML colors can be specified as RGB values, either three decimal integers or three hexadecimal bytes representing the amounts of red, green, and blue in the color. The decimal integers range from 0 to 255. The hexadecimal format begins with the "#" character followed by three hexadecimal bytes (two characters each) between 00 and FF. For example, the color red can be specified as rgb(255, 0, 0) or #FF0000. The RGB system can specify over 3 million colors, but only 140 color names are recognized by the HTML and CSS color specification. This makes it difficult to select the best color name to substitute for the RGB value.

This script can be used to select the color closest to any specified RGB value. The script considers the three RGB values as coordinates in a three dimensional space and calculates the distance between this point and the point represented by every standard color name. The color with the smallest distance, called the error in the script output, is the color to use. For reference, the script outputs the three closest colors to the RGB value specified.

If the script is run using the cscript host program, it will output at the command prompt. The script displays the input RGB values and the three closest color names, with the distance (error) between each and the input RGB values. By default the script will also display a browser window with the same information, but also showing the actual colors (as seen on your hardware). You can omit the browser display by specifying the optional final parameter /n. If you run the script using the wscript host program the output in the browser window will always be displayed.

You can either pass the RGB values to the script as parameters, or the script will prompt for the values. If you double click the script file in Windows Explorer, you will be prompted for the RGB values, then the browser window will display the results. For example, you might run the program with the following command line at a command prompt:

cscript BestColor.vbs 0 102 221

The decimal intergers can be separated by spaces, commas, or periods. The following demonstrates how to specify three hexadecimal bytes:

cscript BestColor.vbs #800080

The hexadecimal bytes can be in one string, as above, or separated by spaces or commas, but all three bytes must be two characters, including a leading zero if necessary.

BestColor.txt <<-- Click here to view or download the program