Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book General > Writers' Corner

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 06-16-2020, 07:12 PM   #1
scruffs
Connoisseur
scruffs doesn't litterscruffs doesn't litter
 
Posts: 58
Karma: 100
Join Date: Jun 2020
Device: ePUB Kindle and iBooks
Question CSS - query colour mode on Kindle and iBooks?

Blowed if I can find out how to do this. I am a writer, not a coder, but not a dunce at code, either.

I want to have different colours for elements (headings, text, etc.) depending on which colour mode the user has selected - on both Kindle and iBooks.

Is it possible to use a media query (or whatever) to have different CSS styles loaded according to the current colour mode? On both Kindle and iBooks?

You would think there is a standard CSS for this. But if there is, I cannot find it.

All those that help will go on my Christmas card list.

Cheers.
scruffs is offline  
Old 06-16-2020, 07:31 PM   #2
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 3,710
Karma: 36079999
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
On Kindle there is no way to do what you want, but you should not need it anyway. Books properly formatted for Kindle will support Enhanced Typesetting and one of that features of that is:

Quote:
Dynamic color contrast: We added dynamic color text contrast to ensure a threshold of contrast between text color and page background color. We maintain the text hue to preserve intended differentiation, but adjust the text lightness as needed for different reading modes such as night mode, sepia, or green.
I don't know about Apple Books. Someone else will have to address that.
jhowell is offline  
Old 06-17-2020, 02:31 AM   #3
scruffs
Connoisseur
scruffs doesn't litterscruffs doesn't litter
 
Posts: 58
Karma: 100
Join Date: Jun 2020
Device: ePUB Kindle and iBooks
Indeed. I just wanted control, is all.

But do you know of a way to do this for iBooks, which does not have the same functionality.

Thanks for your help.
scruffs is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobigen Why are css media query examples in Amzn Kindle Publishing Guidelines so terrible? rjnagle Kindle Formats 14 06-17-2020 02:22 PM
iBooks Night Mode Overriding CSS zephyrmays ePub 23 07-31-2015 11:12 PM
Colour coding CSS chaot Editor 5 03-05-2015 01:32 PM
Overridng link colour with extra CSS cyruss Conversion 2 04-08-2011 07:58 AM


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


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