08-11-2020, 07:39 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
|
Editing Calibre ePub files so each letter has an unique colour?
Would i have to put it in every html file of the public domain book?
I have the hex colors for the 26 letters of the alphabet sorted out. However, obviously i don't have the know how to do it. Thanks for any help. |
08-11-2020, 09:07 AM | #2 |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
You would need to mark up the text, putting every character into its own span
<span class="L">L</span><span class="I">i</span><span class="K">k</span><span class="E">e</span> <span class="T">t</span><span class="H">h</span><span class="I">i</span><span class="S">s</span>. and then have CSS assigning colors to the classes span.A { color : rgb(0,0,255); } span.B { color : rgb(0,255,0); } span.C { color : rgb(255,0,0); } etc. It will increase the size of the book a lot! |
08-11-2020, 09:12 AM | #3 |
Resident Curmudgeon
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
08-11-2020, 11:08 AM | #4 | |
Addict
Posts: 387
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Quote:
|
|
08-11-2020, 11:53 AM | #5 |
Well trained by Cats
Posts: 29,795
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I could see this for FUN Titles or initial Caps., but not a whole book or even a paragraph that was not a 'Ransom Note"
But... some of us with older eyes are now having issues with some colors (was not color blind). BTW The CSS given is a perfectly good way. It allows a single place to tweak the color for a letter |
08-11-2020, 05:59 PM | #6 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
|
Thank you. I will try this now.
|
08-11-2020, 06:03 PM | #7 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
|
I am doing this to recreate in my own way the experiments described here:
https://www.newscientist.com/article...ead-in-colour/ With 30 minutes a day not only did their stroop test levels increase but after they started seeing colored letters in the wild. Developing a degree of synesthesia, with more exposure the greater the effects. |
08-11-2020, 06:28 PM | #8 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
|
I've tried span before, however, it comes up on the page. And only colors the alphabet letters, is there any to fix this? Where am i to place the span in the html?
|
08-11-2020, 07:32 PM | #9 | |
Well trained by Cats
Posts: 29,795
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
<span class="colorT">T</span>Span class="colorh">h</span>Span class="colora">a</span>Span class="colort">t</span> Span class="colori">i</span>Span class="colors">s</span> why the file will get huge |
|
08-12-2020, 12:08 AM | #10 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
|
Thanks theducks, that seems to make more sense. With <span class= “colorA”>a</span> being assigned with span.colorA { color: #00FA9A; +span display: none; }
However, the letters of book itself remain unaffected. Is there some place i must put in the HTML or CSS? Must something else be added? Thanks for help you've given me so far. |
08-12-2020, 03:49 AM | #11 |
The Grand Mouse 高貴的老鼠
Posts: 71,504
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Here's a sample ePub with colour applied to the first six letters.
However, for what you want (to be able to read books with coloured letters) you'd probably be better off trying to persuade someone to add it as a feature to, say, the calibre book viewer. That way you'd be able to read any book in calibre with coloured text, not just those you've laboriously edited. |
08-12-2020, 05:23 AM | #12 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
|
Many thanks pdurrant, this helps a lot.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre has stopped editing my epub | nboyars | Calibre | 3 | 10-17-2014 01:59 PM |
Error importing/editing metadata with files from Feedbooks - Calibre 1.48 Windows x64 | goyta | Library Management | 5 | 08-10-2014 05:52 AM |
Editing ePub files online | miralsattar | General Discussions | 0 | 12-14-2011 10:55 AM |
When Editing Azw files in Calibre... | Anarel | Amazon Kindle | 5 | 05-08-2010 05:14 PM |
What do you use for editing epub files after creation? | JGB | ePub | 8 | 07-21-2009 01:06 AM |