diff --git a/src/calibre/ebooks/mobi/reader/mobi6.py b/src/calibre/ebooks/mobi/reader/mobi6.py index 207303dfcd..9c9ffe1d3a 100644 --- a/src/calibre/ebooks/mobi/reader/mobi6.py +++ b/src/calibre/ebooks/mobi/reader/mobi6.py @@ -513,6 +513,11 @@ class MobiReader(object): 'div' and 'filepos-id' in attrib): pagebreak_anchors.append(tag) + if 'color' in attrib: + styles.append('color: ' + attrib.pop('color')) + if 'bgcolor' in attrib: + styles.append('background-color: ' + attrib.pop('bgcolor')) + if 'filepos-id' in attrib: attrib['id'] = attrib.pop('filepos-id') if 'name' in attrib and attrib['name'] != attrib['id']: