[Bugs] #1592 UNSP: NEW FEATURE: enhanced color selector

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Aug 10 08:21:32 EDT 2010


#1592: NEW FEATURE: enhanced color selector
------------------------------------------+---------------------------------
    Reporter:  walter                     |          Owner:  tomeu      
        Type:  enhancement                |         Status:  new        
    Priority:  Unspecified by Maintainer  |      Milestone:  0.90       
   Component:  sugar                      |        Version:  Unspecified
    Severity:  Unspecified                |       Keywords:  r!         
Distribution:  Unspecified                |   Status_field:  Assigned   
------------------------------------------+---------------------------------

Comment(by walter):

 Not sure what the bug is here. get_random_color returns a string, not an
 xocolor object, so you cannot use it with methods that want an xocolor as
 an argument. You can convert a string to an xocolor using the factory
 method as per below:

 >>> import xocolor
 >>> c = xocolor.get_random_color()
 >>> print c
 #FFC169,#F8E800
 >>> type(c)
 <type 'str'>
 >>> c2 = xocolor.XoColor(c)
 >>> c3 = xocolor.get_next_fill_color(c2)
 >>> print c3
 #FFC169,#00EA11
 >>>

 Are you suggesting that the get methods take strings as arguments instead
 of XoColors? Or I could test for the argument type and do the "right"
 thing depending upon the argument type. But what is the use case?

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1592#comment:28>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list