The Colors library offers a set of tools to work with color more conveniently.
You can use the library to create colors by name (like red or ivory), from pixels in an image, group them into lists of which you can then collectively manipulate hue, brightness and saturation, create lists of harmonious colors based on color theory rules (like complementary or analogous), create lists of gradient colors, work with drop shadows and gradient fills for paths, define powerful indefinite color ranges (like bright red or purplishgreenish) and more.
Just place this line at the start of your script:
colors = ximport("colors")
Outside of Shoebot you can also just
import colors. Color lists from image
pixels then work with PIL/Pillow.
The Colors library has a number of commands that create a new color you can use with fill() or stroke().
rgb(r, g, b, a=None, range=1.0, name="") hsb(h, s, b, a=None, range=1.0, name="") cmyk(c, m, y, k, range=1.0, name="") lab(l, a, b, range=1.0, name="") hex(str, name="")