The color Module

class color.Color(r, g, b)

An RGB color.

copy()

Return a deep copy of this Color.

distance(color)

Return the Euclidean distance between the RGB values of this Color and Color color.

get_blue()

Return the blue value of this Color.

get_green()

Return the green value of this Color.

get_red()

Return the red value of this Color.

get_rgb()

Return a tuple of the RGB values of this Color.

make_darker()

Decrease the RGB values of this Color by 30%.

make_lighter()

Increase the RGB values of this Color by about 40%. This should be the inverse of make_darker, so the multiplier is (1 - .7) / .7.

set_blue(value)

Set the blue value of this Color to int value.

set_green(value)

Set the green value of this Color to int value.

set_red(value)

Set the red value of this Color to int value.

Previous topic

The pixel Module

Next topic

The sound Module

This Page