Can I change the color of text in a post?

There’s nothing in markdown itself for color, so it would only be by embedding HTML. I would have expected something like this to work:

<span style="color:red;">like this.</span>

However, when I actually type that code in, it looks like the style is stripped off, like this.

image

1 Like

In theory we could add yet another plugin, but the more plugins, the more likely we are to see conflict, and I’m hesitant to add plugins that change rendering the actual content. It could make updates to discourse temporarily or permanently break rendering of text on the site.

I think that discourse intentionally strip out styling in order to make themes work. Given that there are users of both light and dark themes on this site, it’s really really easy to end up with font color styling that looks good to you but is unreadable in other themes.

I’d rather use emoji to set things off, like :warning:

:warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning:
This example advice may harm you…
:warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning: :warning:

We can add custom emoji if they would be useful here.

1 Like