MicroPython Cookbook
上QQ阅读APP看书,第一时间看更新

There's more...

The hex code notation system to describe a color's red, green, and blue components is extremely popular. Due to its popularity, it is easy to find a variety of online tools and desktop applications that provide color pickers and color wheels, which represent colors as hex codes. You can simply choose you desired color in these programs and then copy and paste the hex values into your scripts. The following screenshot is taken from the popular open source image editor, GIMP:

In the preceding screenshot, you can see the color wheel that is available in the application. This rich interface easily allows you to find the color that you are looking for by changing its hue or saturation. Once you have picked the color that you want, you can copy the hex code value, which is labeled as HTML notation in this application. This value can then be used in your script using the same technique shown in this recipe.

GIMP is available on Linux, macOS, and Windows and can be downloaded for free from https://www.gimp.org.