mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.05k stars 22 forks source link

[Request] Specifiy colors in text #88

Open nshern opened 7 months ago

nshern commented 7 months ago

I think it would be valuable to be able to specify colors for text, so that certain text elements could be emphasized. I imagine it would be similar to how markdown is able to render it via html e.g.:

<span style="color:blue">some *blue* text</span>.
mfontanini commented 6 months ago

I think this is generally a good idea and I can see the usefulness of it. However, I'm afraid of doing something like this because: a) The code will now need to start parsing HTML. b) Once you start allowing some HTML, more HTML parsing requests will inevitably be made. e.g. then we'll want entire divs with color. Then why not also allow alignment? Why not sub divs that split the text into columns?

I'd like to keep this open until enough people claim this should be a supported feature as I think it will open the door for a lot of complexity in the app.

rondymesquita commented 5 months ago

One suggestion: What about something similar with https://www.npmjs.com/package/markdown-it-attrs Adding the ability to have attributes? But instead of using css classes, using hexa colors?

# header {color:#fff}
paragraph {color:#00ff00}
mfontanini commented 4 months ago

That doesn't look bad actually... Maybe that's an alternative worth considering so we don't go down the html route.

carbon-steel commented 1 month ago

Definitely would love to see this. Especially if the colors could reference colors from the current theme.

henryiii commented 1 week ago

Is there a way to color just a word or section of words with the atters route?