# Targetable Color Schemes

**URL:** https://meta.discourse.org/t/targetable-color-schemes/276967
**Category:** Theme component
**Created:** [August 28, 2023, 11:32pm UTC](https://meta.discourse.org/t/targetable-color-schemes/276967 "2023-08-28T23:32:55Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 28, 2023, 11:32pm UTC](https://meta.discourse.org/t/targetable-color-schemes/276967/1 "2023-08-28T23:32:56Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Add color scheme attribute to HTML |
| 🛠 | **Repository** | [GitHub - VaperinaDEV/targetable-color-schemes: This theme component adds the current color scheme attribute to html. · GitHub](https://github.com/VaperinaDEV/targetable-color-schemes) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

Hello 👋

This theme component adds the `color-scheme="id"` attribute to the `<html>` tag. This attribute contains the current color scheme id. Like this, you can make (CSS, Javascript) changes easily which will be only active on the specific color scheme where you place… 🙂

Target example

```scss
html[color-scheme="128"] {
  // your code
}

```

![Screenshot 2023-08-29 at 1.18.25](https://global.discourse-cdn.com/meta/original/4X/3/9/9/39913b03c91e49562857389ce415d1ca29caeabb.png)

---

_[View the full topic](https://meta.discourse.org/t/targetable-color-schemes/276967)._
