Change colour of selected text


Is there a way to change the colour of the text on selection in the editor? Strangely all the other threads about changing the colour of selected text aren’t actually about that.


Something very similar has been discussed here:


That’s about changing the background colour, I want to change the text colour. Like I said, the other threads strangely don’t seem to be about changing the text colour despite their titles.


Hello again.

Unfortunately what you are asking is not possible.
An expanded explanation is given here:

It boils down to the fact that the developers chose to use a layer below the text (decoration) to show selections. Only background and frames would be possible.



I see, that’s a great shame. I asked because it’s clearly possible on Sublime text. I wanted to try using a dark theme on Atom like the ones so popular on Sublime, but when selecting text the text then can’t be seen. I noticed that on Sublime the background colour was different with the dark themes but also the text changed to white upon selection so everything was clear.


Yes, they mentioned something similar here:

Might there be a workaround with the has-selection class, to be used let’s say in a package?


I agree with you.

Fortunately we can customize the background colour by customization script (stylesheet.less). You can also include in there to detect if you use dark or light background and have the style adapt to it.

In other words… if you do not agree with a theme given to you, you can add some lines in your customization to override this. Look at:

The type of customization possible without installing an add-on package is fantastic.


Not sure what either of you are suggesting. So I can do what to change the colour of the text on selection?


(we are posting at the same time so my notes was late - sorry)

Start by reading a little from here:

@b3by: would you be so kind as to walk through with @hasen where to find the stylesheet and how to use it for his purpose. Thank you.


Well yes I’ve been tweaking the main stylesheet to change the background colour of the selected text. Adding a text colour property doesn’t seem to work though.


Please show us what you have and perhaps explain per picture what you want to do.

Be warned… the original question you ask is not possible - only the background can be changed.


Haha well obviously I can’t do it then. All I wanted to do was what’s stated in the title of the thread. Thanks for your help anyway.


Yeah, sorry, I was just dropping suggestions on the table with no real explanation.
What @hasen is trying to do is not possible anyway.
I expressed the idea a package might be implemented for that, but I’m not sure.


Ah ah. How can you say is not possible when I do have colours inside my files?
screen capture tool

I copied a text from a text editor to geany and from geany to atom.
Unless things changed since January it is technically possible to write in text and to change the colour of the text.
Was there any change since last time?
I would like that feature which is currently working in two of my files XD but I only got red and green.