# How to color a sentence?

[Question edited on 5/28/16] I have read this link. But I still don't understand how to color the text a sentence. Can one actually do that?

• Could anyone give an example for coloring the text? a sentence?
• Where should I go when I have the similar formatting question?
• Use \color{blue}{text} to get $\color{blue}{text}$ – tatan May 29 '16 at 2:08

You cannot color text. That can be deduced from the post you linked to.

• $\rm \color{red}{BUT}\color{green}{\ YOU}\color{blue}{\ CAN!}$ – Bill Dubuque Jul 9 '11 at 1:25
• @Bill: I made the same point a few hours ago. But in order not to encourage it I removed my comment. (I agree that Mariano's answer invites such a comment but I'd be surprised if he hadn't known about that trick) – t.b. Jul 9 '11 at 2:09
• I even object to \rm, in fact :) A mismatch set of fonts is never nice on the eye... let alone if they are randomly colored! – Mariano Suárez-Álvarez Jul 9 '11 at 2:11
• @Bill: Mariano explicitly stated "text". You did not color "text". :) – Willie Wong Jul 9 '11 at 10:16
• @Willie But it is TeXt! For the rare occasions one needs such, this kludge usually suffices. – Bill Dubuque Jul 9 '11 at 13:24
• @Mar RGB is not random. Nor is anyone recommending fruit salad text or "mismatched" fonts. – Bill Dubuque Jul 9 '11 at 13:31
• @Bill: Did you do that in the  environment? – Jack Jul 21 '11 at 0:28
• @Jack Yes, I used the LaTeX \color command. – Bill Dubuque Jul 21 '11 at 1:27

$\color{blue}{\textrm{One can color text}}$ by writing

$\color{blue}{\textrm{One can color text}}$

• This is a poor way to do it. If you now already felt the need to bump this old thread for adding this answer you could at least include a solution that does not use a font different from the one used for actual text. – quid May 29 '16 at 1:26
• Actually, I don't understand the discussion under the answer of Mariano. And neither your comment. What do you mean by "a font different from the one used for actual text"? – Jack May 29 '16 at 1:29
• It is not the same font. What is unclear about this. Look closely and you will see it is not the same. And on the "text": you included a math environment, this is not text anymore. – quid May 29 '16 at 1:32
• Ah, so the point is that the answer depends on how I phrase my question. If one wants to color some words, then he/she can use the math environment. But no way to color text. I have never understood this until today. Thanks a lot for your comment! – Jack May 29 '16 at 1:41
• Yes. Coloring text is not supported. However, using MathJax it is possible to introduce color "through the backdoor." There are however several disadvantages to using it in this way, it is therefore discouraged to do what you recommend in your answer. A slightly better way is explained in meta.math.stackexchange.com/questions/20503 But one still should not used it to insert color all over. – quid May 29 '16 at 1:45