RGB colour
A colour described by three intensities of red, green and blue light, each from 0 to 255.
In more detail
In graphics.py, color_rgb(255, 0, 0) makes red, and color_rgb(128, 0, 255) a purple. Random values for the three give random colours. RGB stands for red, green, blue.
Example
aColor = color_rgb(128, 0, 255)Related terms
- setFill() — graphics.py methods that set a shape's inside colour, its edge colour and its edge thickness.
- random module — The standard library module for pseudo-random numbers and random choices, such as randrange(10) or choice(colours).
Taught in
- Colours, Custom And Random — Hands-on Python: Complete Video Course & Book
- Chapter Two In One Sitting — Hands-on Python: Complete Video Course & Book