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

Default colour palette modification

Neil E.

Active member
#1
Example of an object that doesn't have it's own styling properties (courtesy of Jake):
Code:
.button.primary
{
    background-color: red;
}
I understand that in place of red we can select something from the standard color palette. This obtains a different colour for our button (say background-color: @PrimaryDark). But what if we need a different colour than what currently exists in the palette?

Can an extra custom button be added to the palette (ex. @ModifiedShade or whatever)? That way we have a selection that does not effect any other forum location (all palette choices are already in use).

I suppose what I'm looking for is a way to reference some new colour when it doesn't exist in pre-defined code colours [ex. red, etc.] (and styling properties don't exist). I tried to use a hex value directly in place of red, but no go.
 

Chris D

XenForo developer
Staff member
#2
You should definitely be able to use hex or rgb.

Code:
.button.primary
{
    background-color: #ff0000;
}
This is red.