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

Default colour palette modification

Discussion in 'Styling and Customization Questions' started by Neil E., Jun 25, 2012.

  1. Neil E.

    Neil E. Active Member

    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.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    You should definitely be able to use hex or rgb.

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

    Neil E. Active Member

    Thanks,
    Mucho cool. I didn't know the [#] identifier was required. You just made my life easier.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    You can also do RGB colours:

    Code:
    .button.primary
    {
    background-color: rgb(255,0,0);
    }
    This is red.
     
  5. MagnusB

    MagnusB Well-Known Member

Share This Page