Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert decimal to hexadecimal for bgcolor?

Status
Not open for further replies.

DrumAt5280

Technical User
Sep 8, 2003
194
US
We have the bgColor stored in a SQL database and we want to use it to display a bgColor in a cfm file.

Is there a way to convert a decimal to hexadecimal with Coldfusion? I can't get the decimal number to work in the cfm file.

Thanks,
Dave
 
I actually figured a way to convert it:

<style type="text/css">
body{
background-color: #<cfoutput>#FormatBaseN(SESSION.cancelStruct.bgColor, 16)#</cfoutput>;
}
</style>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top