jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 67 forks source link

Custom Color #616

Closed realmayus closed 3 years ago

realmayus commented 4 years ago

Is it somehow possible to set e.g. the background color of a label to a custom color code, either through a hex code or rgb values?

jarvisteach commented 4 years ago

Absolutely, you should just be able to put the hex code instead of the colour name.

There's a good list of colour names & codes here: http://appjar.info/pythonBasics/#colour-map

Here's an example:

from appJar import gui
with gui('Colours', bg='#8FBC8F') as app:
    app.label('hello world', bg='#006400', fg='#00FF7F')