Changeset 3656:463a9b570b1b in livinglogic.python.xist

Show
Ignore:
Timestamp:
12/28/08 21:10:05 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add a color method witha().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/color.py

    r3652 r3656  
    215215        return self.__class__(*channels) 
    216216 
     217    def witha(self, a): 
     218        """ 
     219        Return a copy of :var:`self` with the alpha value replaced with :var:`a`. 
     220        """ 
     221        (r, g, b, olda) = self 
     222        return self.__class__(r, g, b, a) 
     223 
    217224    def withlum(self, lum): 
    218225        """