# 如何使用主题配色方案

**URL:** https://meta.discourse.org/t/how-to-use-theme-color-scheme/87148
**Category:** Support
**Created:** [2018 年5 月 10 日 09:06 UTC](https://meta.discourse.org/t/how-to-use-theme-color-scheme/87148 "2018-05-10T09:06:59Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### 作者： ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### 发布日期： [2018 年5 月 11 日 14:35 UTC](https://meta.discourse.org/t/how-to-use-theme-color-scheme/87148/2 "2018-05-11T14:35:21Z")

</div>

> [@TheBestPessimist](#):
>
> Is there a possibility to have all the color schemes available by default to them?

Not that I’m aware of, no. This is not possible yet. This is very close though

> [@TheBestPessimist](#):
>
> One idea to “fix” this was to copy the theme multiple times and each time to chose a different color scheme

However, I would not recommend “copying” the entire theme, as in `html`, `js` and `css`.

This would not be very maintainable in the long run as the amount of work you have to do multiplies by the number of color variants you intend to offer to your users.

Here’s something slightly different and we’ll stick with the Material theme since you mentioned it.

If you install the material theme, you get a few color schemes with it. Namely:

```
Material Teal/Amber
Material Red/Blue
Material Blue/Red
Material Indigo/Orange
Material Dark

```

What you need to do is create a new theme for every color scheme you want to offer to your users. Let’s say you want to use

```
Material Red/Blue
Material Blue/Red
Material Dark

```

You would then create three _new_ themes and call them Red, Blue and Dark.

Once those themes in place, make them user selectable.

Now set the color scheme for each of those themes to the matching color scheme. So,

**Red** gets `Material Red/Blue`  
**Blue** gets `Material Blue/Red`  
**Dark** gets `Material Dark`

Once that’s done, you would then add the Material theme as a child theme to all these new themes you just created.

This effectively allows you to offer different color schemes for the same theme with the added benefit that the code for the theme (html, js and css) is located in one place - The Material theme.

That way, if you need to change anything in the theme code, you’d only need to change it in one place and not have do it over and over for every color variant.

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-theme-color-scheme/87148)._
