Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2021, 06:11 PM   #1
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Calibre Reader Ignores Background Color?

I was testing some of my own code using CSS body { background-color: #66ff66; ...} which is an obvious bright green background.

But the Calibre book reader doesn't show me that green.

I see it in the Calibre book Editor, and setting the cover from the epub also shows green--just not in the reader.

If I go into the reader's Color preferences, I can change the background, but it appears to ignore the "Override all book colors: Never" setting.

I'm seeing this on Win10 in Calibre v5.6 (portable) and v5.10.1 (64bit), with reader launched from Calibre GUI, from file extension association in the OS and from the Content Server.

Calibre v2.85.1 (portable) did show the green.

I did check for any existing threads or bug reports about this and didn't find any.

Minimal example epub is attached.
Attached Files
File Type: epub Test Story Title 5-tst1_5.epub (4.3 KB, 96 views)
JimmXinu is offline   Reply With Quote
Old 01-24-2021, 06:31 PM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 9,021
Karma: 62040591
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
In the example file, the green background also doesn't appear in the preview pane of 5.10.1's ebook-edit.exe, while it does in 3.48's.

(also, I laughed at the description on the title page)

Last edited by ownedbycats; 01-24-2021 at 06:33 PM.
ownedbycats is offline   Reply With Quote
Advert
Old 01-24-2021, 06:43 PM   #3
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 950
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Tested here on 5.10.1 and 4.23 and it didn't work on any. Using !important makes it work, though.
thiago.eec is offline   Reply With Quote
Old 01-24-2021, 06:56 PM   #4
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by ownedbycats View Post
In the example file, the green background also doesn't appear in the preview pane of 5.10.1's ebook-edit.exe, while it does in 3.48's.
Strange. I do see the green in ebook-edit (AKA Calibre book editor) as I reported before.
JimmXinu is offline   Reply With Quote
Old 01-24-2021, 07:05 PM   #5
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 9,021
Karma: 62040591
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Side-by-side comparison on Windows 10 Home (19041).
Attached Thumbnails
Click image for larger version

Name:	2021-01-24 20_04_39-.png
Views:	164
Size:	258.5 KB
ID:	184923  
ownedbycats is offline   Reply With Quote
Advert
Old 01-24-2021, 08:18 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,771
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
The one of the left may be a Dark Matter effect

BR
BetterRed is offline   Reply With Quote
Old 01-24-2021, 09:51 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,149
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, body background is under the control of the user, not the book creator. If you really want to override body background color, wrap the contents of body in a div with a background.
kovidgoyal is offline   Reply With Quote
Old 01-25-2021, 11:16 AM   #8
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Interesting.

I know I tested using body {background-color: ...} in a lot of different readers several years ago and they must have mostly worked, otherwise I wouldn't have included that as the way to change background in FFF.

Trying it now a few places, I see that color works in Calibre Edit book preview and Calibre's "Set the cover for the book from the selected format" (AKA from calibre.ebooks.metadata.meta.get_metadata()), plus partially in Apple iPad's Books app, but not any other apps or readers that I tried.

Which I guess is a good thing to know. I'll have to take that make note of that in the default FFF CSS.
JimmXinu is offline   Reply With Quote
Old 01-25-2021, 05:09 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,093
Karma: 131686272
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
Yes, body background is under the control of the user, not the book creator. If you really want to override body background color, wrap the contents of body in a div with a background.
Would it be possible to remove the user control, leave the background as white and allow background colors to wor without diving it?
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background color in Calibre 4 viewer jbacelar Calibre 10 10-07-2019 09:21 PM
Calibre PDF Output: Adding Background Rgb colors customization options and Font Color Lodan PDF 7 02-17-2019 09:09 AM
Css for Calibre viewer background-color Cjammi Calibre 5 03-10-2017 12:09 PM
Calibre's reader ignores pagebreaks? Joseph Picard Conversion 3 06-01-2012 09:46 PM
Any epub reader for PC allows me to change text and background color? ttluisa General Discussions 5 05-11-2010 11:04 PM


All times are GMT -4. The time now is 01:12 PM.


MobileRead.com is a privately owned, operated and funded community.