#5601: Colors: CSS3/SVG presets, construct from HSL/HSV, lighter/darker methods,
linearly combine
---------------------------+------------------------------------------------
   Reporter:  jason        |       Owner:  was                             
       Type:  enhancement  |      Status:  needs_work                      
   Priority:  minor        |   Milestone:  sage-4.3                        
  Component:  graphics     |    Keywords:                                  
Work_issues:               |      Author:  Mitesh Patel                    
   Upstream:  N/A          |    Reviewer:  Jason Grout, Karl-Dieter Crisman
     Merged:               |  
---------------------------+------------------------------------------------

Comment(by jason):

 Good point.  In the mma model (and my patch), c.lighter() is just
 c.blend(white,1/3).  c.lighter(k) is just c.blend(white,k), so
 c.lighter(0) is c, and c.lighter(1) is white.  I can see where your idea
 would be very useful too, though.  We ought to make lighter/darker take
 the fraction as a keyword argument, though, and make the number of times
 the first positional argument:

 def lighter(self, times=1, fraction=1.0/3.0):
     fraction=float(fraction)
     c = self
     for i in range(times):
         c = c.blend((1.0, 1.0, 1.0), fraction)
     return c

 (that is, if we decide to go with the blending patch for now)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5601#comment:40>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--

You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to