Changeset 3652:ea0b7d381124 in livinglogic.python.xist

Show
Ignore:
Timestamp:
12/27/08 12:22:58 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Simplify withlum().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/color.py

    r3650 r3652  
    216216 
    217217    def withlum(self, lum): 
     218        """ 
     219        Return a copy of :var:`self` with the luminosity replaced with :var:`lum`. 
     220        """ 
    218221        (h, l, s, a) = self.hlsa() 
    219         return self.fromhls(h, max(0., min(lum, 1.)), s, a) 
     222        return self.fromhls(h, lum, s, a) 
    220223 
    221224    def abslum(self, f):