For the purposes of learning Chinese, I want to write every character in a short novel in a colour that corresponds to its tone (pronunciation thing). The book is an epub, and I've been doing the html inside it like this:
<span style="color:#64B4FF"> 今 </span>
This works to display the colours correctly, but the file is now so big and unwieldy that highlighting and dictionary lookup has become unacceptably slow. Is there a more efficient way to do this, or a better file format to use? I don't want to convert to pdf because then I would lose the ability to do dictionary lookups.
Possibly relevant info: the characters are in utf-8 right now, there are only five possible colours, and I'm using moon+ reader on Android with the goldendict dictionary.