1. Computing

Convert TColor to HTML Color

By September 23, 2006

Follow me on:

TIPS :: Delphi TColor enumeration is used to specify the color of a Windows-only control. The Graphics unit contains definitions of useful constants for TColor. These constants map either directly to the closest matching color in the system palette (for example, clBlue maps to blue) or to the corresponding system screen element color defined in the Color section of the Windows Control panel (for example, clBtnFace maps to the system color for button faces).

Here's how to convert a TColor Delphi value to a HTML color value in the "#RRGGBB" format...

Related: How to change the background color on different lines of text in a TListBox | TColor to Hex & Hex to TColor | How to save a web page as HTML or MHT

Comments
Comments are closed for this post.
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.