Added documentation for color schemes

This commit is contained in:
squidfunk 2020-05-18 21:37:57 +02:00
parent 6172a9d5b9
commit d114778636
2 changed files with 14 additions and 4 deletions

View File

@ -323,9 +323,19 @@ theme:
### Color scheme ### Color scheme
> Default: `light` > Default: `default`
Click on a color name to change the primary color of the theme: Material for MkDocs supports two color schemes: a light mode, which is just
called `default`, and a dark mode, which is called `slate`. The color scheme
can be set from `mkdocs.yml`:
``` yaml
theme:
palette:
scheme: slate
```
Click on a color name to change the color scheme of the theme:
<style> <style>
.md-typeset button[data-md-color-scheme] { .md-typeset button[data-md-color-scheme] {
@ -342,7 +352,7 @@ Click on a color name to change the primary color of the theme:
} }
</style> </style>
<button data-md-color-scheme="light"><code>light</code></button> <button data-md-color-scheme="default"><code>default</code></button>
<button data-md-color-scheme="slate"><code>slate</code></button> <button data-md-color-scheme="slate"><code>slate</code></button>
<script> <script>

View File

@ -54,7 +54,7 @@ theme:
- tabs - tabs
#- instant #- instant
palette: palette:
scheme: slate scheme: default
primary: indigo primary: indigo
accent: indigo accent: indigo
font: font: