XF 1.2 HTML Colour from Style in Template


Well-known member
Is there a way that I can get the HTML colour for a colour set in the admin panel for use within a template?

For example:

"@pageBackground" used in a template will output "rgb(72, 139, 191)", but I need to get "488bbf" instead. It's to use in some ad code that will only accept the HTML style colour.


Well-known member
Thanks, however I've tried using "@pageBackground" in a template - but it gives the colour in RGB style. It's the 6 character HEX colour code I need to use though, so I'm trying to see if there's a way to get that to be output instead.
Just putting something like @primaryDarker worked for me as explained there.
That rgb notation is standard HTML too so it should work just fine in most situations.