| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
color Extension Module
color provides a screen mixin for color handling:
Color handles color allocation. It maintains a cache of
allocated colors to reduce PLWM's colormap footprint on displays
with a low bit depth.
Returns the pixel value corresponding to color. color can
be a string or tuple of (R, G, B) integers. If the color can't be
allocated and default is provided, get_color tries to
return that color instead. If that fails too, it raises a
ColorError exception.
Return the pixel value for the color defined in the X resource
identified by res_name res_class.
WindowManager.rdb_get is used to lookup the resource, so the
first components of the name and class should be omitted and they should
start with `.'.
If default is provided, that name will be used if no matching X
resource is found. If omitted, or if the color can't be allocated,
ColorError is raised.