CSS - query colour mode on Kindle and iBooks?
#1  scruffs 06-16-2020, 08:12 PM
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.


#2  jhowell 06-16-2020, 08:31 PM
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:

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.

#3  scruffs 06-17-2020, 03:31 AM
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.

Today's Posts | Search this Thread | Login | Register