Canop / clima

A minimal viewer for Termimad
MIT License
30 stars 7 forks source link

Support coloured output #14

Closed savchenko closed 1 year ago

savchenko commented 1 year ago

Measured colouring helps user to recognise key elements: headings, links, etc. Would you consider optionally rendering those in colour?

Canop commented 1 year ago

What would you suggest ? Changing the skin in Clima ? Giving a skin like clima --skin my/file.skin something.md ?

savchenko commented 1 year ago

Yes, something along the lines of clima --config rainbow.toml. As an example, rainbow.toml could be:

[colours]
fg = "#ffffff"
bg = "#000000"
borders = "#3c3c3c"
h1 = "#ff8059"
h2 = "#44bc44"
h3 = "#d0bc00"
bold = ""
italic = ""
underline = ""

borders refers to the table borders, <hr> and similar elements. Foreground, background and headings are self-explanatory. Emphasized elements are assigned null strings, hence should be rendered as any other text.

savchenko commented 1 year ago

Hey, thanks for implementing this! Just a heads up, you might want to publish a new release as currently v1.1 isn't showing up under https://github.com/Canop/clima/releases

Canop commented 1 year ago

you might want to publish a new release

I'm trying. Uploading a release archive is tricky when you're in vacations in the mountains with almost no network...

savchenko commented 1 year ago

Oh, enjoy your vacation then :)