# Coloured text in questions and answers?

Using MathJax it is possible to make text of a different colour using e.g.

$\color{red}{\text{this text would appear in red}}$

However, I rarely see this done and the times I have done it, it has always been edited out. Clearly, this feature could be misused (e.g. by changing the colour of large chunks of text making it harder to read) but it could be used to emphasis key points within a question or answer making them easier to read. So what are people's views on using this feature?

• Can you give examples of it being edited out? I've done it a few times (e.g. here without it being edited out. – Kyle Kanos Feb 27 '16 at 14:04
• @KyleKanos: You used colour there for math, while this question seems to be about (ab)using MathJax to colour text. I suspect someone edited that out because MathJax is for, well, math, while text formatting should be done in markdown. – ACuriousMind Feb 27 '16 at 17:37
• @ACuriousMind: hmm, so it seems. That would be an abuse of mathjax to use it in places of text. – Kyle Kanos Feb 27 '16 at 17:39
• To be clear, you're talking exclusively about constructions of the form $\text{...}$ to introduce colour markup for text? Yeah, that's horrifying, don't do it. Colour for math, when explicitly required, and in moderation, can be OK, but don't colour up your text. There's a reason the system won't naturally let you do it. – Emilio Pisanty Feb 27 '16 at 20:25
• FYI: Apparently this is okay at Math.se. I'm crying on the inside, TBH. – Kyle Kanos Mar 8 '16 at 20:32
• @KyleKanos Thanks for this link. In my opinion the colour in this answer does increase its readability compared to if there was no colour in it. Clearly others disagree. It is apparent that different people read in different ways and somethings work for some people and don't for others. It is clear that most people think it doesn't work and thus I agree with the statement that it shouldn't be used on SE. Of possible interest: generallythinking.com/… – Quantum spaghettification Mar 11 '16 at 7:26

My view is that you should use MathJax markup for things which are math (notation), and that is all. If that means you can't use color in the body of a post, that's okay.

For various reasons, we care about semantic markup here, which basically means using the markup commands to indicate what type of content something is, not to make it look the way you want it. When you use the MathJax delimiters, you are implicitly telling the system "this is math". It might get treated specially by search engines, summarizers, screen readers, and so on. So you shouldn't indicate that something is math when it isn't.

If you want to emphasize a key point of a post, we already have markup for that: either **bold** or _italic_, depending on whether you want the emphasized text to stick out at first glance or just to be stressed without disrupting the normal flow of reading. I'm not denying that there can be good ways to use color in text, but I think we can get by without it.

On the other hand, math notation is more limited, so it's often useful to have more ways of marking up the notation than just bold and italic; for example, to distinguish between different instances of the same variable, or to show significant vs. insignificant figures, or to track part of an expression through a computation. Color is useful in these cases. (Not to mention, bold and italic already have standard meanings in most mathematical notation.) I think the reasons we don't need color in text don't carry over so well to math, so I wouldn't support removing the ability to use color in MathJax.

• Note the the use of code tags (backticks) allows for mild emphasis of a piece of text as well... – Floris Feb 29 '16 at 19:43
• @Floris I'm opposed to that use, though, because of what I mentioned about semantic markup. – David Z Mar 1 '16 at 7:22

"However, I rarely see this done "

Good.

"and the times I have done it, it has always been edited out"

That would be because it is a horrible, visually distracting thing to do. It's only one step better than blinking. Don't use color for emphasis. You shouldn't even need bold very much.

• Note that your use of the block quote gives mild coloring, and is something that I sometimes use for emphasis - even if I am not actually quoting. And it works well. – Floris Feb 29 '16 at 19:43
• +1 for discouraging alternate type faces for emphasis. If you need that to get your point across, the sentence/post is already so badly written that it should be edited anyway. – DanielSank Mar 4 '16 at 2:25
• I want <marquee> enabled! – leftaroundabout Mar 12 '16 at 0:32