Class Color
source code
Color specifications using CSS2 (Cascading Style Sheet) syntax.
http://www.w3.org/TR/REC-CSS2/syndata.html#color-units
Usage:
red = Color(255,0,0)
red = Color(1., 0., 0.)
red = Color.by_name("red")
red = Color.from_rgb(1.,0.,0.)
red = Color.from_rgb(255,0,0)
red = Color.from_hsl(0.,1., 0.5)
red = Color.from_string("red")
red = Color.from_string("RED")
red = Color.from_string("#F00")
red = Color.from_string("#FF0000")
red = Color.from_string("rgb(255, 0, 0)")
red = Color.from_string("rgb(100%, 0%, 0%)")
red = Color.from_string("hsl(0, 100%, 50%)")
|
|
|
from_hsl(cls,
hue_angle,
saturation,
lightness) |
source code
|
|
|
|
|
names()
Return a list of standard color names. |
source code
|
|
|
|