# How to calculate the shades of a color?

**URL:** <https://discourse.processing.org/t/how-to-calculate-the-shades-of-a-color/8426>\
**Category:** Coding Questions\
**Created:** [February 15, 2019, 4:58pm UTC](https://discourse.processing.org/t/how-to-calculate-the-shades-of-a-color/8426 "2019-02-15T16:58:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 20, 2019, 7:34pm UTC](https://discourse.processing.org/t/how-to-calculate-the-shades-of-a-color/8426/4 "2019-02-20T19:34:04Z")

</div>

> [@bobw](#):
>
> evenly spaced fill colors

HSB is indeed the simple way of doing this, but if you want something that is very perceptually uniform, you might want to use **CIELAB** – which is not built-in, but can be converted into / out of.

> **[Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/6903/unexpected-result-in-color-conversion-from-lab-to-rgb)**
>
> Processing is an electronic sketchbook, a language and a worldwide community. This is its forum.

> [@Why doesn’t Processing support LAB?](https://discourse.processing.org/t/why-doesn-t-processing-support-lab/4848):
>
> As the title says. I’m not finding a reason why Processing does not support [the CIELAB color space](https://en.wikipedia.org/wiki/CIELAB_color_space).

---

_[View the full topic](https://discourse.processing.org/t/how-to-calculate-the-shades-of-a-color/8426)._
