diff --git a/docs/src/configuration.md b/docs/src/configuration.md index 406dea3..692dddf 100644 --- a/docs/src/configuration.md +++ b/docs/src/configuration.md @@ -69,6 +69,37 @@ and the user-provided one are used in the user configuration if `stylix.base16Scheme` is not changed in the user config. If that is the case, only the user override is used. +### Extending + +When passing colors to unsupported targets or creating custom modules, it +is possible to access values from the configured color scheme through +`lib.stylix.colors`. +An overview of the available values is shown below. + +```nix +lib.stylix.colors = { + base08 = "ff0000"; + base08-hex-r = "ff"; + base08-dec-r = "0.996094"; + # ... + red = "ff0000"; + # ... + withHashtag = { + base08 = "#ff0000"; + # ... + }; +}; +``` + +This attrset is generated by `mkSchemeAttrs` from `base16.nix`. Refer to the +[documentation](https://github.com/SenchoPens/base16.nix/blob/main/DOCUMENTATION.md#mkschemeattrs) +for more info. + +For more complex configurations you may find it simpler to use +[mustache](http://mustache.github.io/) templates to generate output files. +See [base16.nix](https://github.com/SenchoPens/base16.nix) documentation for +usage examples. + ## Fonts The default combination of fonts is: