Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2023, 10:31 AM   #1
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 977
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
Dark mode and inline SVG

I'm using some inline SVG in my own personal books to include some vector art diagrams in the chapters. This works OK so far in the kepub engine.

What happens to SVG artwork when you run the reader in dark mode? The SVG hardcodes colours, so will I end up with black artwork on a black background?

Dark mode's a feature of some popular OSes. AIUI in web browsers there's some sort of mechanism in the CSS to detect dark mode and set colours appropriately. Does Kobo's dark mode support that, or is its dark mode more simplistic?

I don't think my Aura ONE has the new fangled dark mode support, otherwise I'd test...
chrisridd is offline   Reply With Quote
Old 01-16-2023, 01:15 PM   #2
John F
Grand Sorcerer
John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.John F ought to be getting tired of karma fortunes by now.
 
Posts: 7,941
Karma: 70583139
Join Date: Feb 2009
Device: Kobo Clara 2E
Quote:
Originally Posted by chrisridd View Post
I'm using some inline SVG in my own personal books to include some vector art diagrams in the chapters. This works OK so far in the kepub engine.

What happens to SVG artwork when you run the reader in dark mode? The SVG hardcodes colours, so will I end up with black artwork on a black background?

Dark mode's a feature of some popular OSes. AIUI in web browsers there's some sort of mechanism in the CSS to detect dark mode and set colours appropriately. Does Kobo's dark mode support that, or is its dark mode more simplistic?

I don't think my Aura ONE has the new fangled dark mode support, otherwise I'd test...
Dark mode is more simplistic.
John F is offline   Reply With Quote
Advert
Old 01-16-2023, 01:25 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Never mind.

Last edited by jackie_w; 01-16-2023 at 01:28 PM. Reason: posted in error
jackie_w is offline   Reply With Quote
Old 01-16-2023, 03:25 PM   #4
DevonHess
Can't actually read
DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.
 
DevonHess's Avatar
 
Posts: 81
Karma: 335656
Join Date: Sep 2019
Device: Kobo Forma, Kobo Sage, Kindle PW2
I was under the impression that dark mode literally just inverted the screen.
DevonHess is offline   Reply With Quote
Old 01-16-2023, 04:51 PM   #5
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by DevonHess View Post
I was under the impression that dark mode literally just inverted the screen.
Some methods do, such as some patches. Better designed dark modes only invert text. On modern systems it's invented to save battery on OLED screens. It's better to simply turn down the rear light on LCD or front light on eInk as the fonts are optimised for black text on a white background. On old mono CRTS they used black background and bright text to save tube life, power and allow better focus.
Quoth is offline   Reply With Quote
Advert
Old 01-16-2023, 10:29 PM   #6
DevonHess
Can't actually read
DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.DevonHess ought to be getting tired of karma fortunes by now.
 
DevonHess's Avatar
 
Posts: 81
Karma: 335656
Join Date: Sep 2019
Device: Kobo Forma, Kobo Sage, Kindle PW2
Quote:
Originally Posted by Quoth View Post
Some methods do, such as some patches. Better designed dark modes only invert text. On modern systems it's invented to save battery on OLED screens. It's better to simply turn down the rear light on LCD or front light on eInk as the fonts are optimised for black text on a white background. On old mono CRTS they used black background and bright text to save tube life, power and allow better focus.
Sorry, I meant Kobo eInk devices specifically.
DevonHess is offline   Reply With Quote
Old 01-17-2023, 04:24 AM   #7
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 977
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
Quote:
Originally Posted by Quoth View Post
Some methods do, such as some patches.
I'm not too worried about how the patches behave. Which method does Kobo use in recent firmware releases on certain recent devices?
chrisridd is offline   Reply With Quote
Old 01-17-2023, 06:18 AM   #8
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by chrisridd View Post
I'm not too worried about how the patches behave. Which method does Kobo use in recent firmware releases on certain recent devices?
They invert the text only, so for example a Line art drawing is not affected, but will be in a white box. So illustrated books do display the images correctly, but look ghastly in dark mode with white text and black background. The font doesn't look as nice either.

Just tested on Sage with 4.35.x FW and "Arabel and Mortimer Stories" (books 1 to 6 of originals) converted from azw3 to epub2.

The page turn flash is also more objectionable in Dark mode. It's best kept to save power on OLED phones and tablets. Turning down the front light works better at night, or no front light at all and suitable small angle-poise lamp just to illuminate the ereader, with a suitable bulb in it (I use the yellow stick filament LED types, very like halogen/daylight with no obvious blue. The yellow coating on the sticks is actually a phosphor).

Last edited by Quoth; 01-17-2023 at 06:22 AM.
Quoth is offline   Reply With Quote
Old 01-17-2023, 10:49 AM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,149
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by chrisridd View Post
I'm not too worried about how the patches behave. Which method does Kobo use in recent firmware releases on certain recent devices?
I'm tempted to say both. The dark mode from the ereader Settings menu inverts text when reading but leaves images uninverted. The invert screen which requires a reboot to work inverts everything—text, menus, images.

I use NickelMenu to handle either with the following (change main to whatever other places you want to see this option):

Code:
#
menu_item : main    : Dark Mode          : nickel_setting : toggle : dark_mode
menu_item :main     : Invert & Reboot    : nickel_setting :toggle: invert
    chain_success      : power           : reboot
#
DNSB is offline   Reply With Quote
Old 01-18-2023, 05:12 PM   #10
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
Quote:
Originally Posted by chrisridd View Post
I'm using some inline SVG in my own personal books to include some vector art diagrams in the chapters. This works OK so far in the kepub engine.

What happens to SVG artwork when you run the reader in dark mode? The SVG hardcodes colours, so will I end up with black artwork on a black background?
OK, I have a little personal book made strictly for myself with an SVG image and it happens to be on both my Sage and on my Kindle Oasis currently, so...

For background info, the SVG was made by myself in Inkscape, saved as plain SVG and is a black line-art image on transparent background.

On Kobo Sage, running stock firmware 4.35.204 (which I believe is the current version), in dark mode, I get black artwork on black background. It disappears, in other words, just as you suspected it might.

For fun, I kepubified the book, and checked in kepub format, same thing. Black on black.

On a Kindle Oasis 2, using epub via Send-To-Kindle which delivers KF8 format, same SVG image inverts to white on black.

Hope that helps.
graycyn is offline   Reply With Quote
Old 01-19-2023, 03:36 AM   #11
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Don't use transparency. It doesn't even make sense. Like files for paper print, use white (which is regarded as transparent on print), then the images work properly in Dark Mode.

Amazon doesn't allow transparency.
Quoth is offline   Reply With Quote
Old 01-19-2023, 12:01 PM   #12
jgneff
Member
jgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the partyjgneff brings flavor and color to the party
 
jgneff's Avatar
 
Posts: 21
Karma: 147742
Join Date: Nov 2017
Location: Vancouver, BC, Canada
Device: Kobo Touch B/C, Kobo Glo HD, Kobo Clara HD, Kobo Libra 2
SVG filters and CSS style for dark mode

I doubt e-readers have support for SVG filters, but the following added to your SVG file works pretty well in most browsers for general dark-mode support. Just add it right after the opening svg element.

Code:
<filter id="darkmode">
    <!-- Same as CSS 'filter: invert(1)' but in linear RGB -->
    <feComponentTransfer>
        <feFuncR type="table" tableValues="1 0"/>
        <feFuncG type="table" tableValues="1 0"/>
        <feFuncB type="table" tableValues="1 0"/>
    </feComponentTransfer>
    <!-- Same as CSS 'filter: hue-rotate(180deg)' -->
    <feColorMatrix type="hueRotate" values="180"/>
    <!-- Gamma function: C' = amplitude * pow(C, exponent) + offset -->
    <feComponentTransfer>
        <feFuncR type="gamma" exponent="2.2"/>
        <feFuncG type="gamma" exponent="2.2"/>
        <feFuncB type="gamma" exponent="2.2"/>
    </feComponentTransfer>
</filter>
<style>
@media (prefers-color-scheme: dark) {
    svg {filter: url('#darkmode');}
}
</style>
It inverts the colors (really just to go from light to dark), swings back around 180 degrees to the original color hues, and then converts the gamma back to sRGB from linear RGB. You can try changing or removing the gamma function if it's too dark even for dark mode.

Last edited by jgneff; 01-19-2023 at 02:48 PM.
jgneff is offline   Reply With Quote
Old 01-20-2023, 01:56 PM   #13
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 977
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
Quote:
Originally Posted by graycyn View Post
OK, I have a little personal book made strictly for myself with an SVG image and it happens to be on both my Sage and on my Kindle Oasis currently, so...
Cool!

My next problem is trying to figure out how Kobo handles fonts in the SVG. It seems to replace everything I'm trying with one of the serif fonts. Have you figured out what they're doing with fonts, or is the answer just to convert all text to curves?
chrisridd is offline   Reply With Quote
Old 01-20-2023, 03:37 PM   #14
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
Quote:
Originally Posted by Quoth View Post
Don't use transparency. It doesn't even make sense. Like files for paper print, use white (which is regarded as transparent on print), then the images work properly in Dark Mode.

Amazon doesn't allow transparency.
Personal book for myself and no other, I can do what I want, especially since I rarely use dark mode.

I agree though, were I publishing, transparency would be a very bad idea. Most use cases would render black on black in my experience.
graycyn is offline   Reply With Quote
Old 01-20-2023, 03:41 PM   #15
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
Quote:
Originally Posted by chrisridd View Post
Cool!

My next problem is trying to figure out how Kobo handles fonts in the SVG. It seems to replace everything I'm trying with one of the serif fonts. Have you figured out what they're doing with fonts, or is the answer just to convert all text to curves?
Can't help you there, my image is just a little vector graphic, no fonts involved. I do remember way back when, experimenting with SVG title pages, and I think I found that they worked best for me if I converted everything to a path. But that was a while back.
graycyn is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Randomly changing from Dark Mode to Light Mode C8H10N4O2 Calibre 2 07-28-2022 09:36 PM
Bug: Dark Mode (Windows) Book Details Pop-Up Cover Background Not Changing to Dark cgrapski Calibre 7 05-03-2021 11:45 PM
Calibre 4.10 night mode/dark mode likeaghost Calibre 11 05-03-2020 05:43 PM
SVG images, external file versus inline j.p.s ePub 4 07-18-2014 11:30 AM
Inline SVG questions (whitespace & other practices) politicorific Workshop 6 04-12-2009 05:32 PM


All times are GMT -4. The time now is 09:55 PM.


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