09-24-2020, 05: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, 10:09 PM | #2 | |
Wizard
Posts: 1,089
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
Quote:
Last edited by thiago.eec; 09-25-2020 at 07:29 AM. Reason: Clarify |
|
Advert | |
|
09-24-2020, 10:46 PM | #3 |
creator of calibre
Posts: 44,564
Karma: 24495948
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, 10:49 PM | #4 | |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
Code:
a.text-color { color: inherit; } |
|
09-25-2020, 07:25 AM | #5 |
Wizard
Posts: 1,089
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
|
Advert | |
|
09-26-2020, 01: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, 02: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, 02:20 PM | #8 | |
Wizard
Posts: 1,089
Karma: 1221485
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, 02:21 PM | #9 | ||
Wizard
Posts: 1,089
Karma: 1221485
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 02:27 PM. |
||
Tags |
color background, text |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature Request: Dark Mode menu color/border | Katsunami | Calibre | 3 | 09-01-2020 06:18 PM |
Scroll bar color is dark mode | JSWolf | Calibre | 1 | 08-03-2020 07:01 AM |
CSS text color should be dark blue. Everywhere. | nkormanik | Calibre | 10 | 05-06-2019 06:29 AM |
ePub color text on night mode on iPad | larysa | Apple Devices | 1 | 11-29-2017 06:54 AM |
Change all text color when converting? | Steven630 | Conversion | 4 | 08-15-2012 09:43 AM |