Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Webpage Design

Converting TColor to a hexadecimal color by BobbaFet
Posted: 19 Jan 06

Let me be the first to admit that this isn't my own code.
I found it on the web somewhere, all I did was turn it
into a function (and add the # sign) instead of a
procedure. But my guess is that I am not the only one
looking for ways to do this hence I am posting it.

Helpful people who are making webpage software.
I suggest you use a ColorDialog in conjunction with
this function for maximum effect.


function ColorToHexColor(thisColor: TColor): string;
var RGBValue: TColorRef;
RGBValue := ColorToRGB(thisColor);
Result := '#' + Format('%.2x%.2x%.2x',

Back to Embarcadero: Delphi FAQ Index
Back to Embarcadero: Delphi Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close