Easy Draw Module
  • About the Project
  • Student Developed Art
  • 🐍Python
    • Setup and Install
    • Starter Template
    • Example Code
    • Style Guide
    • Module Reference
      • The Drawing Canvas
      • Colors
      • Drawing Shapes
      • Text and Images
      • Property Getting and Setting
      • Object Methods
      • Event Handling
      • Saving Your Drawing
    • Power Users
    • Issues and Features Coming Soon...
  • Python Curriculum
    • Unit 1: Drawing Basics
    • Unit 2: Drawing Algorithms
    • Unit 3: Functions and Events
  • ☕Java
  • Coming Soon...
  • Java Curriculum
    • Unit 1: Using Easy Draw Objects
    • Unit 2: If Statements and Drawings
    • Unit 3: Iteration and Drawings
    • Unit 4: Methods and Classes to Abstract Drawings
    • Tabs
Powered by GitBook
On this page
  • 1. Name of the Color
  • 2. RGB Value
  • 3. Hex Value
  • Easy Draw's Color Picker

Was this helpful?

Export as PDF
  1. Python
  2. Module Reference

Colors

PreviousThe Drawing CanvasNextDrawing Shapes

Last updated 4 years ago

Was this helpful?

There are 3 ways you can use colors in Easy Draw:

1. Name of the Color

The easiest way to represent an color is by using the color's name in a string.

Examples:

color = "red"
color = "green"
color = "blue"
color = "white"
color = "black"

Here is a list of many of the colors Easy Draw supports.

Easy Draw uses all Tkinter color values. Any Tkinter color value will work in Easy Draw.

2. RGB Value

You can define a color as a tuple with 3 color values representing red, green, and blue. This is know as “RGB”. RGB stands for Red, Green, and Blue. We specify how much red, green, and blue to use by a number range of 0-255. No light is zero. Turn the light on all the way on and it is 255. We need three numbers to specify three colors, so (0, 0, 0) means no red, no green, no blue -- Black.

Here are some other examples:

Red

Green

Blue

Color

0

0

0

Black

255

255

255

White

127

127

127

Gray

255

0

0

Red

0

255

0

Green

0

0

255

Blue

255

255

0

Yellow

Examples:

color = (255, 0, 0)
color = (0, 255, 0)
color = (0, 0, 255)
color = (255, 255, 255)
color = (0, 0, 0)

3. Hex Value

Hex color values represent color in the same way as RGB, but instead of decimal (base 10) number values they use hexadecimal (base 16) values.

A hexadecimal color is specified with: #RRGGBB.

RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.

For example, #0000FF is displayed as blue, because the blue component is set to its highest value (FF) and the others are set to 00.

Examples:

color = "#FF0000"
color = "#00FF00"
color = "#0000FF"
color = "#FFFFFF"
color = "#000000"

Easy Draw's Color Picker

To make it easy to discover colors, Easy Draw comes with a built in color picker.

It will look different on different operating systems.

But when you select a color, it will display the Hex and RGB value for you to record and use in your program.

🐍
Linux Example
Windows 10 Example