Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Feature Request: Themes/color control #48

Closed
rien333 opened this issue Dec 20, 2018 · 11 comments
Closed

Feature Request: Themes/color control #48

rien333 opened this issue Dec 20, 2018 · 11 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rien333
Copy link

rien333 commented Dec 20, 2018

Any way to change the color output? By default, my html comments are green, which for longer comments makes them quite hard to read in my theme (which might be partly due to my theme being at fault; nonetheless, being able to change it from green could improve readability under some circumstances)

Themes would be a more general solution, but an option that allows for more fine-grained control of colors could also be handy.

As a slight bonus, it would be neat if themeing would allow you to se text properties (e.g. disabling bold headers, making comments italic but the same color as regular text, etc).

@swsnr
Copy link
Owner

swsnr commented Dec 21, 2018

There’s no such feature, and I for my part won’t add it myself; I just don’t need it.

I’m open for pull requests though.

@swsnr swsnr added help wanted Extra attention is needed good first issue labels Dec 25, 2018
@swsnr
Copy link
Owner

swsnr commented Dec 27, 2018

I think I’ll make mdcat use syntect themes for colouring and styling and add means to change the theme via env vars, like bat does it. This would also simplify code a bit.

Would this work for you?

@rien333
Copy link
Author

rien333 commented Dec 27, 2018

Sure it would!

@swsnr
Copy link
Owner

swsnr commented Dec 29, 2018

Great.

Note to self: Use appropriate markdown scopes for elements in rendered output; see Markdown syntax definition for a list of possible scopes.

@swsnr swsnr self-assigned this Jan 6, 2019
@swsnr swsnr added enhancement New feature or request and removed good first issue help wanted Extra attention is needed enhancement New feature or request labels Jan 6, 2019
@swsnr
Copy link
Owner

swsnr commented Jan 7, 2019

We’ll also at some point want to check COLORTERM for 24bit support and use ansi_colours to convert to 256 bit colours if the terminal doesn’t support true colours.

Or we’ll just dump 24bit escape codes and hope that the terminal emulator copes, in whatever way 🤷‍♂️

swsnr added a commit that referenced this issue Apr 2, 2019
swsnr added a commit that referenced this issue Apr 2, 2019
syntect doesn't support strikethrough so there's no point in enabling it

See GH-48 and GH-71
swsnr added a commit that referenced this issue Apr 2, 2019
@swsnr swsnr removed their assignment Apr 15, 2020
@swsnr swsnr added the help wanted Extra attention is needed label Jun 25, 2020
@swsnr
Copy link
Owner

swsnr commented Oct 18, 2023

Closing this, because I don't intend to do anything about this any time soon. Some basic infrastructure exists, but as things stand I'm happy with the default colours, and won't change anything here.

Pull requests are welcome.

@swsnr swsnr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@cohml
Copy link

cohml commented Feb 5, 2024

I would also majorly support this feature (but can't contribute code as I don't know rust - yet! 😅 ). With 2k stars to date I'm honestly suprised this hasn't been requested more often.

For example, I use iTerm2 with a pretty standard dark mode theme, and TOC links are nearly unreadable in all but the darkest rooms:

image

If not a full suite of different themes like bat, perhaps it would be more tractable to implement just two, one optimized for light more and one for dark mode?

This one niggle aside, major love for mdcat! Definitely the best command line Markdown viewer around.

@David-Else
Copy link

Hi, I am very confused. The README shows different themes:

mdcat in WezTerm, with "One Light (base16)", "Gruvbox Light", and "Darcula (base16)" (from left to right)

and it says you can use syntect code highlighting:

highlights code blocks with syntect,

How do i select the general theme, and/or the code highlighting theme? In bat I use:

export BAT_THEME="Visual Studio Dark+"

Do I have to select it in the source code and compile myself? Thanks.

@swsnr
Copy link
Owner

swsnr commented Mar 10, 2024

You can't. The screenshot shows different themes of the terminal emulator, IE, you'd select these in reg Wezterm config.

mdcat does not support custom themes.

@David-Else
Copy link

@swsnr Thanks for the quick feedback. How about syntect code highlighting? I am also having a look at t https://github.com/Inlyne-Project/inlyne.

@swsnr
Copy link
Owner

swsnr commented Mar 10, 2024

mdcat uses a fixed set of colors for syntect highlighting. There is no custom theme support in mdcat. Really. 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants