bashtage / sphinx-material

A material-based, responsive theme inspired by mkdocs-material
Other
317 stars 91 forks source link

Hex colors not supported for color_primary and color_accent #66

Closed johnthagen closed 4 years ago

johnthagen commented 4 years ago

When setting 'color_primary': '#FFFF00', (yellow), the top bar ends up being colored purple (regardless of the hex code input). Is this a bug?

Screen Shot 2020-09-01 at 8 20 57 AM
bashtage commented 4 years ago

You can only use the list of colors specified in the configuration file. These are many precomputed css values that depend on one of the colors being specified.

johnthagen commented 4 years ago

Thanks for the information. Sorry for the basic question, but where would one find the configuration file to reference the possible options?

bashtage commented 4 years ago

You get it when you create a sphinx site. If you clone this repo, you will see it in the docs folder. If you build the docs folder, you will have a perfect replica of the documentation site. Editing these files is a simple way to get started.

johnthagen commented 4 years ago

In case someone else finds this issue, the available options are documented here: https://bashtage.github.io/sphinx-material/customization.html#configuration-options

color_primary

color_accent

ri0t commented 4 years ago

How much work would it take to convert the css to dynamic coloring? I totally like the whole setup - except the limited color options :-)

bashtage commented 3 years ago

@ri0t Supporting arbitrary colors would be a near-complete rewrite of the CSS. The CSS relies heavily on the named and precomputed colors.