1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 HTML Colour from Style in Template

Discussion in 'Styling and Customization Questions' started by nrep, Dec 19, 2013.

  1. nrep

    nrep 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.
    Slion likes this.
  2. mistypants

    mistypants Well-Known Member

    Go to your color palette and you'll see them listed. It'll be something like
    Slion and Amaury like this.
  3. nrep

    nrep 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.
  4. Slion

    Slion Member

    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.

Share This Page