Dashboard: Add series color shades (#61300)

* Dashboard: Add series color shades

Add color option "Shades of a color" which gives each series a color derived from a user-selected base color.

* Documentation: Add entry for color shades

Describe color option "Shades of a color" in documentation.

* Chore: formatting fixes

* Dashboard: Use better fallback color for color shades in fieldColor.ts

Fall back to a gray color if the configured color cannot be parsed.

* Chore: fix typo in fieldColor.test.ts

* Documentation: fix a sentence

* remove custom color parsing and change logic a bit

* Fix prettier issue

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
This commit is contained in:
Jiří Kraml
2023-04-13 14:03:31 -07:00
committed by GitHub
co-authored by Torkel Ödegaard nmarrs Kristina Durivage
parent 4a7f27489e
commit 8d6314c654
5 changed files with 62 additions and 3 deletions
@@ -119,6 +119,7 @@ Select one of the following palettes:
| Color mode | Description |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Single color** | Specify a single color, useful in an override rule |
| **Shades of a color** | Selects shades of a single color, useful in an override rule |
| **From thresholds** | Informs Grafana to take the color from the matching threshold |
| **Classic palette** | Grafana will assign color by looking up a color in a palette by series index. Useful for Graphs and pie charts and other categorical data visualizations |
| **Green-Yellow-Red (by value)** | Continuous color scheme |