r/selfpublish•
exhist

Help with images in ebook (night-mode/day-mode)

I'm trying to put a symbol above each chapter in my book. Currently I have a .png exported from Adobe Illustrator. The image looks nice on my e-reader when I'm in day-mode, but not in night-mode. It's just a black box. Does anyone know how I'm supposed to format it so that the colors flips correctly?

Posted Jun 9, 2015, 3:02 AM UTC

38
_njd_•

What software are you using to create the ebook? Scrivener? Something else?

And what are you using to check the ebook?

If night/day mode is something your ereader software does (iBooks?) I'm guessing it just switches the text background/foreground colors.

If you have a black image with a transparent background, then the whole thing is going to look black when it's placed on a page with a background of rgb(0,0,0).

An image with a white (not transparent) background should display correctly, but it would look a bit startling on a black page.

The PNG format allows for variable opacity, so in theory you could take a white background in your image and give it 50% opacity, but Photoshop and GIMP (and most likely Illustrator) don't support it well.

There is a tool called [pngquant] (https://pngquant.org) that can help.

2
exhistOP•

Yes, I'm using Scrivener and checking it on Moon+ Reader for Android. Haven't tried in iBooks yet. In Moon+ Reader you can pretty much change the background to any color you want. The image stays black with a transparent BG, which is fine so long as the page is lighter than the image. But when I switch to night mode (as in, the black text on the page becomes white), that's when I need the image to become white also. Wouldn't an image with a 50% white BG still have a faint white box around it? I'll try pngquant. Thanks!

1
_njd_•

Another way around it might be to embed a font with the symbol in it. That way, it would be rendered like text instead of an image, so ereader software would have full control over the appearance.

Another possibility is to export an SVG image instead of a PNG. But I'm not sure how well SVG is supported in ereaders.

1
exhistOP•

Yeah, I was wondering if there was someway to make it act like a font. I'll try it. Thanks for the help.

1
HolyPotato•

I'm not familiar with day and night modes on an e-reader, but naive question: is the image black-and-white/greyscale, or colour? What happens if you convert it to greyscale?

1
exhistOP•

Hmm...I tried doing it in grayscale but unfortunately it didnt help. Still has a box around the image when I switch to night mode.

1
KatieKLE•

There's nothing you can really do about this for all devices. Mobi doesn't allow transparent graphics period. I'm not sure which epub devices do or don't.

The workaround I've seen in Vellum is to embed a SVG vector graphic in css, but that's like post-grad level book creation and they don't support third party images, it's just a few standard chapter headings that are part of the program.

1
exhistOP•

That's what I was afraid of. There has to be a way to do this. I'll play around with the SVG idea. Thanks!

1