Quoting "Steffen Macke" <[email protected]>:
'#%02x%02x%02x' % (c.red*255, c.green*255, c.blue*255)
I don't think that this is too difficult. You can wrap that in a
function that takes
a DiaColor object as the argument.
class DiaColor(...):
...
def __hex__(self):
return '#%02x%02x%02x' % (self.red*255, self.green*255, self.blue*255)
would allow to use
hex(my_DiaColor_object)
right?
_______________________________________________
dia-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia