Skip to Content
Tkinter GUI Application Development Blueprints, Second Edition - Second Edition
book

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

by Bhaskar Chaudhary
March 2018
Beginner to intermediate
422 pages
10h 33m
English
Packt Publishing
Content preview from Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Specifying styles

Under the purview of styling, we will cover how to apply different colors, fonts, border widths, reliefs, cursors, and bitmap icons to widgets.

First, let's see how to specify the color options for a widget. You can specify the following two types of color for most widgets:

  • The background color
  • The foreground color

You can specify the color by using hexadecimal color codes for the proportion of red(r), green(g), and blue(b). The commonly used representations are #rgb (4 bits), #rrggbb (8 bits), and #rrrgggbbb (12 bits).

For example, #fff is white, #000000 is black, #f00 is red (R=0xf, G=0x0 , B=0x0 ), #00ff00 is green (R=0x00, G=0xff, B=0x00), and #000000fff is blue (R=0x000 , G=0x000 , B=0xfff ).

Alternatively, Tkinter ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tkinter GUI Application Development Blueprints

Tkinter GUI Application Development Blueprints

Bhaskar Chaudhary

Publisher Resources

ISBN: 9781788837460Supplemental Content