Skip to content

Commit 59c6faf

Browse files
authored
add named colors and themes (#206)
Update the docs to include discussion of named colors and the available themes.
1 parent 1352ca9 commit 59c6faf

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

docs/api/graph/color-palettes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ for the dark theme. Overall there are 24 distinct colors with this palette.
5353
[Polychrome light palette]: https://rdrr.io/rforge/Polychrome/man/palettes.html
5454

5555
@@@ atlas-uri { hilite=palette%3Dlight24 }
56-
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&palette=light24&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
56+
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&palette=light24&theme=dark&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
5757
@@@
5858

5959
@@@ atlas-graph { show-expr=false }
60-
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&palette=light24&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
60+
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&palette=light24&theme=dark&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
6161
@@@
6262

6363
## Epic

docs/api/graph/theme.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Two themes are supported: `light` and `dark`. The default is the `light` theme.
2+
3+
## Light
4+
5+
@@@ atlas-uri { hilite=theme%3Dlight }
6+
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&theme=light&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
7+
@@@
8+
9+
@@@ atlas-graph { show-expr=false }
10+
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&theme=light&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
11+
@@@
12+
13+
## Dark
14+
15+
@@@ atlas-uri { hilite=theme%3Ddark }
16+
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&theme=dark&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
17+
@@@
18+
19+
@@@ atlas-graph { show-expr=false }
20+
/api/v1/graph?e=2012-01-01T09:00&no_legend=1&theme=dark&stack=1&tz=UTC&q=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
21+
@@@

docs/asl/ref/color.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ Set the color for the line. The value should be one of:
1212
* 6 digit hex RBG, e.g. ff0000 is red.
1313
* 8 digit hex ARGB, e.g. ffff0000 is red. The first byte is the [alpha](alpha.md)
1414
setting to use with the color.
15+
* Named colors. These are useful when working with [themes](../../api/graph/theme.md), they provide
16+
a few shades for some common colors. The specific colors will vary based on the theme to ensure
17+
they have good contrast with the background color. Available options:
18+
* `blue1`, `blue2`, `blue3`
19+
* `gray1`, `gray2`, `gray3`
20+
* `green1`, `green2`, `green3`
21+
* `orange1`, `orange2`, `orange3`
22+
* `purple1`, `purple2`, `purple3`
23+
* `red1`, `red2`, `red3`
1524

1625
For queries with multiple time series, color palettes are available to automatically assign
1726
different colors to the various series. See [Color Palettes](../../api/graph/color-palettes.md).

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ nav:
3131
- Line Styles: api/graph/line-styles.md
3232
- Multi Y Axis: api/graph/multi-y.md
3333
- Output Formats: api/graph/outputs.md
34+
- Themes: api/graph/theme.md
3435
- Tick Labels: api/graph/tick.md
3536
- Time Shift: api/graph/time-shift.md
3637
- Time Zones: api/graph/time-zone.md

0 commit comments

Comments
 (0)