# Use color scheme color if dark scheme, otherwise use my color in theme

**URL:** <https://meta.discourse.org/t/use-color-scheme-color-if-dark-scheme-otherwise-use-my-color-in-theme/191365>\
**Category:** Development\
**Created:** [May 23, 2021, 10:49am UTC](https://meta.discourse.org/t/use-color-scheme-color-if-dark-scheme-otherwise-use-my-color-in-theme/191365 "2021-05-23T10:49:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Alex\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_p/32/163548_2.png) [@Alex\_P](https://meta.discourse.org/u/Alex_P)\
**Post date:** [May 23, 2021, 10:49am UTC](https://meta.discourse.org/t/use-color-scheme-color-if-dark-scheme-otherwise-use-my-color-in-theme/191365/1 "2021-05-23T10:49:13Z")

</div>

I want to do something like this

```scss
.some-link {
  @if var(--scheme-type) == 'dark' {
    color: var(--primary);
  } @else {
    color: #3b5998;
}

```

but of course it is not possible because there is no `if` in CSS and SCSS is not processed at runtime.

And as far as I can see Discourse does not add any classes to indicate whether the dark scheme is active, and CSS does not allow custom properties in selectors.

Any ideas what could be the best workaround?

---

_[View the full topic](https://meta.discourse.org/t/use-color-scheme-color-if-dark-scheme-otherwise-use-my-color-in-theme/191365)._
