# Cleaning up our color palette 🎨

**URL:** <https://meta.discourse.org/t/cleaning-up-our-color-palette/61263>\
**Category:** Development\
**Created:** [19 Aprile 2017, 3:40pm UTC](https://meta.discourse.org/t/cleaning-up-our-color-palette/61263 "2017-04-19T15:40:19Z")\
**Posts on this page:** 1\
**Showing post:** 1

<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:** [19 Aprile 2017, 3:40pm UTC](https://meta.discourse.org/t/cleaning-up-our-color-palette/61263/1 "2017-04-19T15:40:19Z")

</div>

At the moment all our CSS has mountains of extreme levels of repetition when it comes to picking colors.

When we need a color that is not in our “base” palate, we reach out to one of these 2 functions:

### dark-light-choose

This function allows us to choose 1 color for the dark theme and one for the light theme.

### dark-light-diff

This function allows you to apply different levels of “brightness” to a color depending on weather you are in dark or light themes.

This is very very messy now cause we have **enormous** amounts of repetition.

The line:

```plaintext
dark-light-choose(scale-color($highlight, $lightness: -50%), scale-color($highlight, $lightness: 50%));

```

Is repeated 30 or so times in our scss files, and that is only for the 50% color.

The line:

```plaintext
 dark-light-diff($primary, $secondary, 90%, -60%);

```

Is similarly duplicated in tons of spots.

This mess leads to a few problems:

- Did I just pick the right line to cut and paste ?

Should I pick `dark-light-diff($primary, $secondary, 90%, -60%);` or `dark-light-diff($primary, $secondary, 90%, -65%);` like the polls plugin picked?

- Why have all this repeated text everywhere?

- Do we really need these many colors?

### How do we make some progress here?

I feel there are a few different options we have here which require some careful thought.

- Option 1: move to CSS class based coloring, and define colors for each class. Then we could use `.dim-text` for when we want dim text and so on.

- Option 2: shorten the functions… eg: have … `dark-light(90%)` automatically expand to `dark-light-diff($primary, $secondary, 90%, -75%)` or something along those lines, come up with sane defaults

- Option 3: define a proper color palate in foundation scss that includes vars for EVERY color we ever are allowed to use and only draw from those vars.

Which of these options sound the most appealing to you? Am I missing anything?

cc @riking @awesomerobot

---

_[View the full topic](https://meta.discourse.org/t/cleaning-up-our-color-palette/61263)._
