presenterm icon indicating copy to clipboard operation
presenterm copied to clipboard

[Request] Specifiy colors in text

Open nshern opened this issue 2 years ago • 6 comments

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>.

nshern avatar Dec 09 '23 21:12 nshern

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.

mfontanini avatar Dec 12 '23 01:12 mfontanini

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}

rondymesquita avatar Feb 08 '24 12:02 rondymesquita

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

mfontanini avatar Feb 09 '24 17:02 mfontanini

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

carbon-steel avatar May 11 '24 11:05 carbon-steel

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

henryiii avatar Jun 29 '24 04:06 henryiii

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

There's a mention of bracketed spans so something like this: this is [red text]{color:red}, could work

DrunkenToast avatar Aug 04 '24 12:08 DrunkenToast