How to color a plain text?


Hi. I am beginner to Atom.IO. I want to use Atom also as an .txt reader for reading .txt files but could you tell me please how can I can color the plain text ? Thanks.


Highlighting in Atom is determined by the active language grammar, which looks for specific words and gives them CSS classes so that the syntax theme can color them. It’s possible to create new grammars. Do you want specific words to be specific colors like Atom does with programming languages, or were you thinking about the ability to manually highlight arbitrary segments of text?


No no. I just want to make the plain text in different color.


Do you want it all to be the same color?


Yes. This is what I want.


Try adding this to your styles.less:

.syntax--text {
    color: green;


(File -> Stylesheet… on Windows, Atom -> Stylesheet… on macOS, Edit -> Stylesheet… on Linux)


Thank you!


@DamnedScholar, thank you. Is there a way to add color based on formatting?

This is text in color 2

  • This is text in color 3


Yes, it’s called a grammar. The closest you might want is language-gfm (builtin), but I don’t recognise that markdown flavour.

If you want custom colours based on a custom syntax, you will need to write a grammar package for it.


I use language-markdown, but I prefer to write notes in Asciidoc, which has very similar syntax and a lot more stuff. There’s a package for that, too.