aeosynth / bk

Terminal Epub reader
MIT License
255 stars 16 forks source link

[Feature Request] Use human identifiable colors #19

Open jeevatattva opened 2 years ago

jeevatattva commented 2 years ago

Thank you for your work on bk. I've only been using this app to read epub, ever since I'd first tried.

I appreciate you adding the ability to define colors (hex codes) for background and foreground. While that's an improvement, it is still very difficult to get hex codes for colors when I'm not on a computer. I would suggest to add human readable/writable color names, like, Graphicsmagick's Color Names. While at it, I'd like some preset themes added, as implemented by another rust project - bat.

I haven't worked on a rust project before, so, it does seem like a good time to pick it up.

aeosynth commented 2 years ago

Hi thanks for the request. I like the idea of bundling themes, which would you suggest? I'd prefer popular themes already bundled with other rust projects. Also be warned, if you do want to contribute code, the theming code here is particularly bad :). This could be a good time to look into using a separate config file.

jeevatattva commented 2 years ago

I like the idea of bundling themes, which would you suggest?

I'm glad you liked the idea. I do like GitHub theme for light backgrounds, and Solarized in general but I'm not hung up on either of those themes. Previously I'd used Books and Reasily, as EPUB readers. Both of those of readers support embedded CSS in e-books.

Also be warned, if you do want to contribute code, the theming code here is particularly bad :).

I'm going through both bk and bat sources to get a hang of the implementation, and referencing rust lang documentation, as and when required. I'll run my ideas by you before proceeding.

This could be a good time to look into using a separate config file.

Sure, that would be good to retain values for existing options too, such as, bg, fg, width & toc.

aeosynth commented 2 years ago

support embedded CSS

that is a much larger task, but doable

aeosynth commented 2 years ago

@jeevatattva any progress? I may make a new release next month.

Disonantemus commented 8 months ago

But really is not that necessary, is very easy to do an alias, an get always your preferred colors, if you want ideas or hex values, look bellow:

popular1 popular2



Maybe I would like to have more colors to setup, not just fg+bg, and then makes sense something like this:

Define colors in shell variables, like nnn or a simple conf|ini in ~/.config/bk.


Also if you want ideas, you can check the following:

Epr has Colorschemes. Epy has Color profiles. Baca has Color Dark and Color Light definitions in ~/.config/baca/config.ini.