Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2020, 07:39 AM   #1
TherealFlynt
Junior Member
TherealFlynt began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
Question 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.
TherealFlynt is offline   Reply With Quote
Old 08-11-2020, 09:07 AM   #2
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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!
pdurrant is offline   Reply With Quote
Old 08-11-2020, 09:12 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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
Quote:
Originally Posted by TherealFlynt View Post
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.
Why? Why? Why?
JSWolf is offline   Reply With Quote
Old 08-11-2020, 11:08 AM   #4
retiredbiker
Addict
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 387
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Quote:
Originally Posted by pdurrant View Post
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!
You could do that with search and replace, once the css is set up, so at least you wouldn't have to edit every letter in the book. But why?
retiredbiker is offline   Reply With Quote
Old 08-11-2020, 11:53 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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
theducks is offline   Reply With Quote
Old 08-11-2020, 05:59 PM   #6
TherealFlynt
Junior Member
TherealFlynt began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
Thank you. I will try this now.
TherealFlynt is offline   Reply With Quote
Old 08-11-2020, 06:03 PM   #7
TherealFlynt
Junior Member
TherealFlynt began at the beginning.
 
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.
TherealFlynt is offline   Reply With Quote
Old 08-11-2020, 06:28 PM   #8
TherealFlynt
Junior Member
TherealFlynt began at the beginning.
 
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?
TherealFlynt is offline   Reply With Quote
Old 08-11-2020, 07:32 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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:
Originally Posted by TherealFlynt View Post
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?
around EACH LETTER.
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
I did not finish the coding of the text . you also need a CSS entry for each class (52 letters wort + numbers)
theducks is offline   Reply With Quote
Old 08-12-2020, 12:08 AM   #10
TherealFlynt
Junior Member
TherealFlynt began at the beginning.
 
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.
TherealFlynt is offline   Reply With Quote
Old 08-12-2020, 03:49 AM   #11
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
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.
Attached Files
File Type: epub Color.epub (2.0 KB, 133 views)
pdurrant is offline   Reply With Quote
Old 08-12-2020, 05:23 AM   #12
TherealFlynt
Junior Member
TherealFlynt began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: none
Many thanks pdurrant, this helps a lot.
TherealFlynt is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 04:29 PM.


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