09-24-2020, 04:40 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Sep 2020
Device: Kindle, Surface Duo
|
How do I change the text color to accomodate dark mode?
Hi all,
Most of my devices are configured with dark mode and all of the books I have (mostly in .EPUB format) adjust properly with blue links (for table of contents) and white text (on black background). However, one book I have has an illegible dark gray text color when viewing in dark mode. How can I edit this book so that it adjusts properly to either white text in dark mode and black text in light mode? Many thanks! |
09-24-2020, 09:09 PM | #2 | |
Wizard
Posts: 1,019
Karma: 1189271
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Last edited by thiago.eec; 09-25-2020 at 06:29 AM. Reason: Clarify |
|
Advert | |
|
09-24-2020, 09:46 PM | #3 |
creator of calibre
Posts: 44,380
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Or use the option in the viewer preferences to always override book colors
|
09-24-2020, 09:49 PM | #4 | |
Running with scissors
Posts: 1,556
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
Code:
a.text-color { color: inherit; } |
|
09-25-2020, 06:25 AM | #5 |
Wizard
Posts: 1,019
Karma: 1189271
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
Advert | |
|
09-26-2020, 12:47 PM | #6 |
Junior Member
Posts: 3
Karma: 10
Join Date: Sep 2020
Device: Kindle, Surface Duo
|
Thanks very much for the replies!
Where exactly would I make this change in the css .stylesheet? |
09-26-2020, 01:19 PM | #7 |
Junior Member
Posts: 3
Karma: 10
Join Date: Sep 2020
Device: Kindle, Surface Duo
|
Ok so I changed *all* instances of where I saw "color: rgb(0,0,0);" to read color: inherit;
There were also other some rgb values. This seemed to have done the trick! Thanks. Now I just want to find out how to makes images responsive... Any tips on how to make .epub's as adaptable as possible? |
09-26-2020, 01:20 PM | #8 | |
Wizard
Posts: 1,019
Karma: 1189271
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Example: If you find this rule: Code:
p { ... color: #808080; ... } Code:
p { ... color: inherit; ... } |
|
09-26-2020, 01:21 PM | #9 | ||
Wizard
Posts: 1,019
Karma: 1189271
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Quote:
Code:
img.big { width: 100%; height: auto; } Code:
img.small { width: 30%; height: auto; } Last edited by thiago.eec; 09-26-2020 at 01:27 PM. |
||
Tags |
color background, text |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature Request: Dark Mode menu color/border | Katsunami | Calibre | 3 | 09-01-2020 05:18 PM |
Scroll bar color is dark mode | JSWolf | Calibre | 1 | 08-03-2020 06:01 AM |
CSS text color should be dark blue. Everywhere. | nkormanik | Calibre | 10 | 05-06-2019 05:29 AM |
ePub color text on night mode on iPad | larysa | Apple Devices | 1 | 11-29-2017 05:54 AM |
Change all text color when converting? | Steven630 | Conversion | 4 | 08-15-2012 08:43 AM |