Whitening background of Gutenberg texts

Post your questions & get help from friendly LibriVoxers
BrizeCrize
Posts: 703
Joined: June 20th, 2020, 2:36 pm
Location: Ohio, USA

Post by BrizeCrize »

Anybody know how to change the (often brownish) background color of the Gutenberg texts? I've found white background on other versions (PDF, etc) but they are often riddled with scanning errors, so I prefer to use the main (HTML?) version.

Mine eyes thank you,
Brize Crize
TriciaG
LibriVox Admin Team
Posts: 60808
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

Could you provide an example?
School fiction: David Blaize
America Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
redrun
LibriVox Admin Team
Posts: 2940
Joined: August 11th, 2022, 8:32 pm
Contact:

Post by redrun »

I've seen one or two that were far worse (much darker brown, making the black text all but unreadable), but here's one with a beige background on the HTML options:
https://www.gutenberg.org/ebooks/6340

The good news is, your internet browser almost certainly has a simplified "reader view" that shows everything as black on white, or at least much closer to it. How to access that depends which program you use to access the internet.

Chrome is what most folks use. It does have this feature, but it takes a minute or three to turn it on for the first time:
https://www.howtogeek.com/423643/how-to-use-google-chromes-hidden-reader-mode/
After that, it should be as easy as the rest.

If you use Edge, Safari, Firefox, etc., then look for either a "page" or "book" icon at the end of the address bar. Click it to switch to Reader View, and again to switch back. Some pictures here:
https://lifehacker.com/how-to-use-your-browsers-reader-mode-to-actually-read-w-1847480062
I'll be out for a bit on this last weekend of April, but still checking in as I get the chance. I will try to follow up on Monday, with anything I can't do on the go.
Boomcoach
Posts: 1058
Joined: December 29th, 2008, 8:37 am
Location: Bluffton, IN
Contact:

Post by Boomcoach »

That was a pretty dark background. Slightly off-white is usually better than stark white to avoid eye fatigue, YMMV, but that page is annoyingly dark.
Boomcoach
My Catalog Page
My current Solo project A Spoiler of Men by Richard Marsh
One role needed to complete the Dramatic Reading of The Leader by Murray Leinster, help us finish this project!
Penumbra
Posts: 1360
Joined: May 10th, 2016, 6:16 pm

Post by Penumbra »

Or...in windows you can copy and paste the entire text to (say) a word document on your local computer. That is, highlight the text (^A), copy to the clipboard (^C) , open a new word document, and paste the text into it (^V).
Tom Penn
SowasVon
Posts: 205
Joined: January 24th, 2022, 5:00 pm

Post by SowasVon »

BrizeCrize wrote: May 15th, 2023, 12:26 pm Anybody know how to change the (often brownish) background color of the Gutenberg texts?
You could also edit the page's HTML code. It will set the background to white until you reload the page.
These are the instructions for Firefox, but Chrome and Edge also have this function and I assume it should work roughly the same:

1. Right-click somewhere on the background where there's no text.

2. In the context menu, click Inspect (Q).
>> At the bottom of the page, an inspector window with the HTML code of the website opens.

3. Above the code, type into the search bar: background
>> This should select the first block of code that contains the word.

4. Double-click the selected text.
>> The text gets put into a more orderly layout and you can now edit it.

5. In the block of text, locate: background: #faebd0; and change it to background: #ffffff;
(at least #faebd0 is the code in redrun's example - whatever else it is, it should be at the very beginning of the text block and have six digits)

6. Click anywhere outside of the block of text.

7. Close the inspector window (X button top right).

Addendum:
#ffffff is the code for pure white. If you feel like messing around with other colours, here's a page with more codes:
https://html-color.codes/
E.g. ivory is #fffff0 (since off-white being good for reading was mentioned in a previous post in this thread :D ).
"You're on Librivox? Pffft. You just like to hear yourself talk."
"Yuuuup." :mrgreen:
BrizeCrize
Posts: 703
Joined: June 20th, 2020, 2:36 pm
Location: Ohio, USA

Post by BrizeCrize »

SowasVon wrote: May 17th, 2023, 3:35 pmYou could also edit the page's HTML code. It will set the background to white until you reload the page.
These are the instructions for Firefox, but Chrome and Edge also have this function and I assume it should work roughly the same:

1. Right-click somewhere on the background where there's no text.

2. In the context menu, click Inspect (Q).
>> At the bottom of the page, an inspector window with the HTML code of the website opens.

3. Above the code, type into the search bar: background
>> This should select the first block of code that contains the word.

4. Double-click the selected text.
>> The text gets put into a more orderly layout and you can now edit it.

5. In the block of text, locate: background: #faebd0; and change it to background: #ffffff;
(at least #faebd0 is the code in redrun's example - whatever else it is, it should be at the very beginning of the text block and have six digits)

6. Click anywhere outside of the block of text.

7. Close the inspector window (X button top right).

Addendum:
#ffffff is the code for pure white. If you feel like messing around with other colours, here's a page with more codes:
https://html-color.codes/
E.g. ivory is #fffff0 (since off-white being good for reading was mentioned in a previous post in this thread :D ).
Good information all! I particularly enjoyed this last one (above) as it made me feel like an 'insider' peeking behind the scenes. All to no avail, however, at least on 'Mosquitos', my current project, as it stays brownish despite my #ffffff command. (Even has a exclamation point inside a 'caution' icon with 'webkit user select' crossed out so it KNOWS I am trying to change it, but ignores me.). Oh well, good information anyway, the only time you learn anything on these computers is when you delve into modifying something, so I'll remember that #ffffff code for future reference. Thanks all!.
redrun
LibriVox Admin Team
Posts: 2940
Joined: August 11th, 2022, 8:32 pm
Contact:

Post by redrun »

Ahh, I see the trouble. Any of our recommendations would have worked on the HTML version of a Gutenberg text, but the project actually uses an Archive.org scan:
https://archive.org/details/mosquitoes0000faul_y7t0/page/n9/mode/1up

What you see there is a web page that loads up the scanned PDF - same browned pages, same scanning errors. Changing the background of the web page doesn't affect the scan, just the stuff around and behind the scan.

There's a text-only version you can download, but that's made by automation and doesn't have the rounds of proofing and correction that Gutenberg would do.
I'll be out for a bit on this last weekend of April, but still checking in as I get the chance. I will try to follow up on Monday, with anything I can't do on the go.
BrizeCrize
Posts: 703
Joined: June 20th, 2020, 2:36 pm
Location: Ohio, USA

Post by BrizeCrize »

redrun wrote: May 19th, 2023, 7:37 am Ahh, I see the trouble. Any of our recommendations would have worked on the HTML version of a Gutenberg text, but the project actually uses an Archive.org scan:
https://archive.org/details/mosquitoes0000faul_y7t0/page/n9/mode/1up

What you see there is a web page that loads up the scanned PDF - same browned pages, same scanning errors. Changing the background of the web page doesn't affect the scan, just the stuff around and behind the scan.

There's a text-only version you can download, but that's made by automation and doesn't have the rounds of proofing and correction that Gutenberg would do.
Thanks, Redrun, for that clarification...that's sort of what my gut feeling was - that this was just a picture (i.e. scan) of an old (brownish paged) book and turning into white paged one was not a simple matter. I'll keep plugging along, maybe my eyes will adjust and at least I know I have the correct words in front of me. Stopping to check on words that don't seem right (or missing them altogether) is maddening as well.
Rapunzelina
LibriVox Admin Team
Posts: 17802
Joined: November 15th, 2011, 3:47 am

Post by Rapunzelina »

Maybe this would work: download the pdf of the scanned book, open it and then print it (ctrl+P), selecting "Microsoft Print to PDF" in black and white.
I know my instructions are vague, but I'm hoping redrun or someone else will see that, and if the idea is promising, they'll give better instructions :D

Edit: oh, here's an image of the Print Window:
https://www.adobe.com/content/dam/dx-dc/uk/en/resources/pdf-to-b-w/PDF-Grayscale-2.png.img.png

If this makes the brown into gray, which doesn't really help, there might be an option in the "Properties" or "Advanced" for just black and white, and not gray-scale?
TriciaG
LibriVox Admin Team
Posts: 60808
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

I don't have Microsoft Print to PDF but PDF Creator instead. I downloaded the PDF and tried printing to PDF as "black & white". No matter what I tried in the settings, it previewed as grayscale (still a dark background). :?
School fiction: David Blaize
America Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
redrun
LibriVox Admin Team
Posts: 2940
Joined: August 11th, 2022, 8:32 pm
Contact:

Post by redrun »

Yes, the "black and white" setting is a common shorthand for "grayscale", and doesn't usually adjust the brightness to actual black and white.

But there are PDF programs that let you adjust the way it shows you a PDF, like this one (freely available, open source):
https://yacreader.com/features

If you'd like to keep your PDF reader, you can use some other tools to change the file and open the new version. It seems that some scanning software could do this, but I don't know of one for sure. If you'd like to peek again behind the curtain, there are some examples of doing this with a "command-line" tool here:
https://superuser.com/questions/622950/is-there-a-way-to-increase-the-contrast-of-a-pdf-that-was-created-by-scanning-a
That doesn't seem hard once you know how to do it, but is far outside most folks' experience with computers.
I'll be out for a bit on this last weekend of April, but still checking in as I get the chance. I will try to follow up on Monday, with anything I can't do on the go.
Peter Why
Posts: 5849
Joined: November 24th, 2005, 3:54 am
Location: Chigwell (North-East London, U.K.)

Post by Peter Why »

Am I misunderstanding the problem? Given the html version of the text, I selected all (CTRL-A), copied (CTRL-C), and pasted into Notepad++. Saved the file, opened with a word processor (LibreOffice), and changed the font to suit me (Times 14 point). This gave me the text as black on white.

Peter
"I think, therefore I am, I think." Solomon Cohen, in Terry Pratchett's Dodger
TriciaG
LibriVox Admin Team
Posts: 60808
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

Peter Why wrote: May 20th, 2023, 10:40 am Am I misunderstanding the problem? Given the html version of the text, I selected all (CTRL-A), copied (CTRL-C), and pasted into Notepad++. Saved the file, opened with a word processor (LibreOffice), and changed the font to suit me (Times 14 point). This gave me the text as black on white.

Peter
In this case, while the OP talks about a Gutenberg text, it isn't one. It's an Archive PDF text scan.
School fiction: David Blaize
America Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
Peter Why
Posts: 5849
Joined: November 24th, 2005, 3:54 am
Location: Chigwell (North-East London, U.K.)

Post by Peter Why »

Thanks, Tricia ... I misunderstood.

EDIT: ... Though apparently you could do the same thing with a pdf if you're using Adobe or Apple View: https://kipkis.com/Efficiently_Select_All_the_Text_in_a_PDF_Document

Peter
"I think, therefore I am, I think." Solomon Cohen, in Terry Pratchett's Dodger
Post Reply