Working with colors

In previous recipes, we have set the colors of a widget using color names, such as white, blue, or yellow. These values are passed as strings to the foreground and background options, which modify the widget's text and background colors.

Color names are internally mapped to RGB values (an additive model that represents a color by its combination of red, green, and blue intensities), and this translation is based on a table that is platform-dependent. Therefore, if you want to consistently display the same color in different platforms, you can pass the RGB value to the widget options.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset