bk icon indicating copy to clipboard operation
bk copied to clipboard

[Feature Request] Use human identifiable colors

Open jeevatattva opened this issue 2 years ago • 5 comments

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.

jeevatattva avatar Nov 17 '21 19:11 jeevatattva

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.

aeosynth avatar Nov 18 '21 00:11 aeosynth

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.

jeevatattva avatar Nov 18 '21 20:11 jeevatattva

support embedded CSS

that is a much larger task, but doable

aeosynth avatar Nov 18 '21 22:11 aeosynth

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

aeosynth avatar Dec 21 '21 04:12 aeosynth

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

  • Gruvbox
  • Molokai
  • Dracula
  • Solarized Dark
  • Zenburn
  • Nord

  • Base 16 family ... (a lot of themes, with color definitions)

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.

Disonantemus avatar Jan 05 '24 23:01 Disonantemus