mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
LRF Colors to HTML Colors
This commit is contained in:
parent
92dc7600e4
commit
b3d8351fb4
@ -262,6 +262,9 @@ class Color(object):
|
||||
def __getitem__(self, i): # Qt compatible ordering and values
|
||||
return (self.r, self.g, self.b, 0xff-self.a)[i] # In Qt 0xff is opaque while in LRS 0x00 is opaque
|
||||
|
||||
def to_html(self):
|
||||
return 'rgb(%d, %d, %d)'%(self.r, self.g, self.b)
|
||||
|
||||
|
||||
class EmptyPageElement(object):
|
||||
def __iter__(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user