View Single Post
Old 02-29-2016, 08:51 PM   #11
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Libron View Post
I did everything as in these instructions and it doesn't work. Those css files I have come from mods I have installed, mostly from KOReader.
Quote:
Originally Posted by Libron View Post
Actually, I now see it does work, but only with images inside the text, not with the cover image. Is there a way to do it for the cover, too?
I did an experiment myself last night. The CSS I found worked in a kepub, but not an epub. That's about what I expected as different renderers are used for them and the kepub renderer is more likely to support this.

And as the others have said, the cover is probably using different code. If the cover was placed by calibre (a conversion or Polish) it will be displayed using SVG rather than a simple IMG tag. The sample code I gave will only work with the latter. I am sure the something similar is possible for the image inside the SVG wrapper. But, if you are using kepubs, this will help when opening the book, but not with the covers display in the interface. For epubs, the covers are done by rendering the first page of the book. For kepubs, the covers are an image in the epub with the appropriate properties. This means the cover image in the book will need to be inverted. And that puts you back to the original question.

A possible way to do this is to send the covers separately. The Kobo drivers can send the covers to the device so that the device does not need to generate them. The cover sent is whatever is the cover in the calibre library. That still needs a way to invert the covers, but it is an alternative.

Another alternative is to not use night mode, but to invert the colours of the text using CSS. That would mean the interface would display normally, but when reading it would be in a pseudo-night mode. Getting this right would take some experimentation, but it should be possible.
davidfor is offline   Reply With Quote