/usr/share/pyshared/visual/crayola.py is in python-visual 1:5.12-1.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import colorsys
black = (0,0,0)
white = (1,1,1)
red = (1,0,0)
green = (0,1,0)
blue = (0,0,1)
yellow = (1,1,0)
cyan = (0,1,1)
magenta = (1,0,1)
orange = (1,0.6,0)
def gray(luminance):
return (luminance,luminance,luminance)
def rgb_to_hsv(T):
if len(T) > 3:
T = T[:3]
return apply(colorsys.rgb_to_hsv,T)
def hsv_to_rgb(T):
if len(T) > 3:
T = T[:3]
return apply(colorsys.hsv_to_rgb,T)
|