Comments in default theme in Atom (Juno) are too dark

I enjoy the default One Dark theme in Atom (which Juno inherits), but it makes comments much darker than code, and I don’t want them to look like second class characters. We can override the theme’s colors easily, but the way to do so has changed a number of times recently, so it takes time to track down what works. Here’s what’s working for me right now.

Open the Stylesheet (File > Stylesheet…) and add the following somewhere:

// Comments are important.
@comment-color: #509040; // As light as code; darker than """ text """.
atom-text-editor .syntax--comment {
    color: @comment-color; // Sets the comment text.
    font-style: normal; // Don't use italic.
}
.syntax--punctuation.syntax--definition.syntax--comment {
    color: @comment-color; // Makes the // or # into the same color as the comment text.
}

When you save, it should updated, and you should see the new colors.

(You could also just use a different theme, but I otherwise like One Dark.)

If anyone feels like I do about comments in Juno, then I hope this will help.

3 Likes