Answers.Body: <p>It's possible to make an AZW3 ebook (or a section of an ebook) to have black background and white text by adding <code>style="background-color:black;color:white"</code> to the <code>&lt;body&gt;</code> tag of the html file with text inside your AZW3. </p>
  
  <p>The problem is whether your chosen e-reader will <em>display</em> the background. For example, the internal Calibre reader will happily show black pages with white text; on the other hand, my Kindle Paperwhite 3 <em>will not</em> respect the <code>background-color</code> setting on body, but <em>will</em> use the <code>color</code> parameter, rendering white text on white background and making the book unreadable! </p>
  
  <p>Not ideal, to put it mildly.</p>
  
  <p>To get around this, you can set the background color on a div wrapping the text. The downside is that there will always be a white border around the page, because both Calibre reader and Kindle seems to apply its own page borders and ignore any margin or padding settings on <code>&lt;body&gt;</code> or <code>&lt;html&gt;</code> tags.</p>
  
  <p>If I <em>really</em> wanted to do this, I would set the background and text color on both body and a wrapper div - that way I'd get a nice black pages on compliant e-readers, and black rectangles on Kindle and co.</p>
  
  <p>...and then I'd try to test it on as many e-readers as possible, because Murphy's law is a thing, and any styling that has the potential of rendering the content unreadable will probably do it. ;P</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-24T16:57:05.890Z
Answers.LastActivityDate: 2019-04-24T16:57:05.890Z
Answers.UserDisplayName: corvidism
Body: <p>I'm trying to make a page black background with white text but it doesn't work. (AZW3 format)</p>
  
  <p>Any ideas for html code?
  I've tried both background and background-color and they don't work.</p>
  
Tags: <calibre><editing>
Title: It's possible to add a background-color: / background: BLACK (with white text) for a page in an AZW3 ebook?
UserDisplayName: m30l
ThreadText: # It's possible to add a background-color: / background: BLACK (with white text) for a page in an AZW3 ebook?
  
  (Asked by: username_0 on 2018-03-10)
  
  I'm trying to make a page black background with white text but it doesn't work. (AZW3 format)
  
  Any ideas for html code?
  I've tried both background and background-color and they don't work.
  
  **Tags:** calibre, editing
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-24. Score: 0
  
  It's possible to make an AZW3 ebook (or a section of an ebook) to have black background and white text by adding `style="background-color:black;color:white"` to the  tag of the html file with text inside your AZW3.
  
  The problem is whether your chosen e-reader will *display* the background. For example, the internal Calibre reader will happily show black pages with white text; on the other hand, my Kindle Paperwhite 3 *will not* respect the `background-color` setting on body, but *will* use the `color` parameter, rendering white text on white background and making the book unreadable!
  
  Not ideal, to put it mildly.
  
  To get around this, you can set the background color on a div wrapping the text. The downside is that there will always be a white border around the page, because both Calibre reader and Kindle seems to apply its own page borders and ignore any margin or padding settings on  or  tags.
  
  If I *really* wanted to do this, I would set the background and text color on both body and a wrapper div - that way I'd get a nice black pages on compliant e-readers, and black rectangles on Kindle and co.
  
  ...and then I'd try to test it on as many e-readers as possible, because Murphy's law is a thing, and any styling that has the potential of rendering the content unreadable will probably do it. ;P
  
  
  ---
  
  