#!/usr/bin/python # Print a random background colour for a terminal in #rrggbb format. # Adam Sampson # FIXME: it would be nice if this kept some history rather than actually being # random; use a property on the root window to track the hue? from hsv import hsv_to_rgb from random import random (r, g, b) = hsv_to_rgb(random(), 1.0, 0.2) print "#%02x%02x%02x" % (int(r * 255), int(g * 255), int(b * 255))