# Help changing color of buttons

**URL:** https://meta.discourse.org/t/help-changing-color-of-buttons/126580
**Category:** Support
**Created:** [August 22, 2019, 10:42pm UTC](https://meta.discourse.org/t/help-changing-color-of-buttons/126580 "2019-08-22T22:42:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [August 22, 2019, 10:42pm UTC](https://meta.discourse.org/t/help-changing-color-of-buttons/126580/1 "2019-08-22T22:42:27Z")

</div>

Referencing back to this post:

> [@Colors changed in beta7?](https://meta.discourse.org/t/colors-changed-in-beta7/105647):
>
> Some of my theme colors have changed after upgrading like the buttons and the quote highlight, etc. Is this a permanent change that I need to tweak via css or a mistake? Seems like a step backwards. Before: After: Edit: I see it was a change made here: [https://review.discourse.org/t/better-contrast-ratio-match-between-dark-and-light-themes/933](https://review.discourse.org/t/better-contrast-ratio-match-between-dark-and-light-themes/933) so, is this expected behavior @awesomerobot?

Something yet again changed in latest build and Kris’ beautiful CSS solution no longer works. I’ve wasted an hour digging around in the css but have not found an elegant solution. Anyone have ideas?

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [August 23, 2019, 4:48am UTC](https://meta.discourse.org/t/help-changing-color-of-buttons/126580/2 "2019-08-23T04:48:13Z")

</div>

I’m not aware of any recent change that would cause this. However, the good news is that if you’ve updated fairly recently then you should be able to use this new feature

[https://github.com/discourse/discourse/pull/7987](https://github.com/discourse/discourse/pull/7987)

What that means is that you no longer have to find all the selectors where the `$primary-low` color is used and override them. You only have to change it in one place. That place is the `about.json` file of your theme where you [define the color palette](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648#heading--2-c).

Say for example your palate looks like this

```plaintext
"Solarized Light": {
  "primary": "586E75",
  "secondary": "EEE8D5",
  "tertiary": "268BD2",
  "quaternary": "CB4B16",
  "header_background": "002B36",
  "header_primary": "93A1A1",
  "highlight": "B58900",
  "danger": "CB4B16",
  "success": "859900",
  "love": "DC322F"
}

```

The only thing you’d need to do to override the `$primary-low` is to define it here like so

```diff
"Solarized Light": {
  "primary": "586E75",
+ "primary-low": "FF0000",
  "secondary": "EEE8D5",
  "tertiary": "268BD2",
  "quaternary": "CB4B16",
  "header_background": "002B36",
  "header_primary": "93A1A1",
  "highlight": "B58900",
  "danger": "CB4B16",
  "success": "859900",
  "love": "DC322F"
}

```

and the new color will be automatically used everywhere instead of the one Discourse generates for you.

If your theme is not remote - meaning that it was created on your Discourse site in admin \> customize - then you will have to export it, make the change above and then import it again - because this is a new feature and is not fully incorporated into the UI yet.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [August 23, 2019, 2:35pm UTC](https://meta.discourse.org/t/help-changing-color-of-buttons/126580/3 "2019-08-23T14:35:44Z")

</div>

That worked beautifully, thank you Joe!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 22, 2019, 2:35pm UTC](https://meta.discourse.org/t/help-changing-color-of-buttons/126580/4 "2019-09-22T14:35:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
