kivymd / KivyMD

KivyMD is a collection of Material Design compliant widgets for use with Kivy, a framework for cross-platform, touch-enabled graphical applications. https://youtube.com/c/KivyMD https://twitter.com/KivyMD https://habr.com/ru/users/kivymd https://stackoverflow.com/tags/kivymd
https://kivymd.readthedocs.io
MIT License
2.2k stars 661 forks source link

Custom Theme Colors #754

Closed runette closed 3 years ago

runette commented 3 years ago

Description of the Feature

The Theme Color Palette and Font Choices listed in the Material Design site are meant to be indicative and not prescriptive, as both the text and the palette design tool make clear.

It should be possible to set up a template using any combination of colors and fonts - whilst at the same making it very easy to use Out of the Box with the standard MD palette.

This could be done by allowing the colors object in ThemeManager to be overridden with a custom object. This is how @AngularMaterial address the same problem,

All that would be needed is the following - I will try to send a PR with this in.

You will then be able to create your own version of color_definitions.py, import that into your main.py and do the following (for instance ) in the MDApp.__init__()

self.theme_cls.colors = custom.colors
self.theme_cls.primary_palette = "Blue"

It is working in my app at the moment.

kulothunganug commented 3 years ago

Duplicate of #727

HeaTTheatR commented 3 years ago

https://github.com/kivymd/KivyMD/commit/3274d622abc0986c82719393a357b6a745e061f2