# Site header icons don't use header primary color

**URL:** https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093
**Category:** Bug
**Created:** [February 1, 2019, 6:45am UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093 "2019-02-01T06:45:56Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![fhe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fhe/32/113345_2.png) [@fhe](https://meta.discourse.org/u/fhe)
#### Post date: [February 1, 2019, 6:45am UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/1 "2019-02-01T06:45:56Z")

</div>

I’ve installed v2.3.0.beta1 and noticed a ux regression.

The site header icons don’t use the header primary color specified in the color scheme:

 ![discourse-header-icons](https://global.discourse-cdn.com/meta/original/3X/0/c/0c1f9e4e47e25ff02130558bff8b2ddbf6a66351.png)

![discourse-header-primary-color](https://global.discourse-cdn.com/meta/optimized/3X/7/a/7a3902188c1894d23bf0a89a34de1aefc2b8c5da_2_345x27.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 1, 2019, 11:16am UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/2 "2019-02-01T11:16:36Z")

</div>

@david & @awesomerobot is this related to your report on icons no longer using opacity?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 1, 2019, 11:40am UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/3 "2019-02-01T11:40:11Z")

</div>

Yes, almost certainly. I’ll add it to the list to fix

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 1, 2019, 3:05pm UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/4 "2019-02-01T15:05:37Z")

</div>

There is a fix here, but ultimately the color might be different from where it was before:

**The fix**  
I added a new color variable, but was comparing the wrong colors within it.  
`$header_primary-low-mid: dark-light-diff($primary, $secondary, 70%, -45%);`

It looked fine in our default themes because the headers use the same colors as the rest of the page, but if the header is dark and the body is light, then you’re going to notice the issue (what @fhe is reporting)

I’ve just updated that to use `$header_primary` and `$header_background` instead of `$primary` and `$secondary`.

* * *

That being said, the colors might be slightly different from what they were before. Here’s why:

**How it worked before**  
Previously they used `$header_primary, $lightness: 50` or `$header_primary` along with `opacity: .7`

If you were using a light background in the header, you’d end up with `$header_primary` adjusted to be 50% lighter (which is basically a light grey for our standard light theme).

If you were using a dark background you ended up with `$header_primary` which is just the unaltered color.

How we were treating the color was entirely different based on whether it was a dark or a light background, which isn’t consistent.

**How it works now**  
Those icons were updated to use `$header_primary-low-mid`. Which is adjusted to be brighter or darker depending on the header’s background color

The way it behaves now is the same for dark/light themes. On light backgrounds `$header_primary` is lightened to have less contrast and for dark backgrounds `$header_primary` is darkened to have less contrast.

---

<div class="post-metadata">

### Author: ![fhe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fhe/32/113345_2.png) [@fhe](https://meta.discourse.org/u/fhe)
#### Post date: [February 1, 2019, 3:24pm UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/5 "2019-02-01T15:24:55Z")

</div>

Many thanks for looking into this, @awesomerobot!

I did a rebuild and unfortunately, the result is quite different:

 ![discourse-header-icon-neon](https://global.discourse-cdn.com/meta/original/3X/2/a/2a04349b1e0d4f1abddeaa4c6a3c7b0fc23dba57.png)

The correct coloring using `#FFFFEF` (which is also used for the font in my logo) would be something along

 ![discourse-header-icon-correct](https://global.discourse-cdn.com/meta/original/3X/e/d/ed0fd1094eef76cc01f977a49d1504efca22db98.png)

I’ve reported something similar back in December and think it’s related  
[https://meta.discourse.org/t/changing-the-color-of-the-header-category-nav/104338](https://meta.discourse.org/t/changing-the-color-of-the-header-category-nav/104338)

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 1, 2019, 3:52pm UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/6 "2019-02-01T15:52:14Z")

</div>

Right, so the white you selected is slightly yellow and when it’s darkened the yellow becomes much more prominent.

If you want to override the color you can add some CSS:

```SCSS
.d-header-icons {
 .d-icon {
    color: #ffffef;
  }
}

```

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 4, 2019, 12:10am UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/7 "2019-02-04T00:10:02Z")

</div>

@awesomerobot should we keep this bug report open? Anything more to do on our side?

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 4, 2019, 3:47pm UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/8 "2019-02-04T15:47:15Z")

</div>

I think we’re good here.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 4, 2019, 3:47pm UTC](https://meta.discourse.org/t/site-header-icons-dont-use-header-primary-color/108093/9 "2019-02-04T15:47:18Z")

</div>


