# Hoe CSS-kleur te wijzigen voor een enkel thema-palet?

**URL:** https://meta.discourse.org/t/how-to-change-css-color-for-a-single-theme-palette/171867
**Category:** Support
**Created:** [1 december 2020 om 11:27 UTC](https://meta.discourse.org/t/how-to-change-css-color-for-a-single-theme-palette/171867 "2020-12-01T11:27:11Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [2 december 2020 om 10:00 UTC](https://meta.discourse.org/t/how-to-change-css-color-for-a-single-theme-palette/171867/3 "2020-12-02T10:00:13Z")

</div>

Thanks for pointing that out, @Johani. It looks like the `dark-light-choose($light, $dark)` function does exactly what I want, but my problem now is that it’s not detecting the change of palette.

My only active theme is called “Nacho” and it has two palettes: “Clara” (Light) and “Oscura” (Dark):

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/b/dbcd321d6b3bdefa90860c2ff3681e37c49e8957.png)

I’ve personalized it with this CSS:

```plaintext
$dark-theme-ins: #4da06d;
$light-theme-ins: #acf2bd;
.modal.history-modal {
    ins {
        background: dark-light-choose($light-theme-ins, $dark-theme-ins);
    }
}

```

This works with the light palette:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/d/ed921d91a3b98239f3c2bf06d24129adba1da268.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/a/c/ac320e0732f819b92cb9d7a7655928dd1741b863.png)

But it doesn’t work with the dark palette:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/a/fa279da6e4e13197cab015232b4c4f6d30f47cde.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/2/7/27fc331b34cdaee8babf3e98aea124b475aa620e.png)

If I change the CSS to this, it works:

```plaintext
.modal.history-modal {
    ins {
        background: $dark-theme-ins;
    }
}

```

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/e/ae2e2478ed732d22bff7866738d9b6205bc34909.png)

So it looks like the change to the dark palette is not being detected. I can see that `is-light-color-scheme` looks at the brightness of `$primary` and `$secondary`. Here is my dark palette:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/e/4e444cdb5c0b259845285b883bcb360bc26ae43b.png)

And the bright palette:

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/3/33ac2c6845733de325892dc3b22ee22fc01b6a81.png)

I’m all out of ideas.

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-css-color-for-a-single-theme-palette/171867)._
