Editor Font Colors for comments

The comments show up in very faded grey that is almost invisible on most computers.

Using IDE 1.8.16, the Preferences windows shows the settings file to be located there:

C:\Users\User\AppData\Local\Arduino15\preferences.txt

but other forum posts say it is in:

C:\Program Files (x86)\Arduino\lib\theme\theme.txt

but I added these settings to both files (see below) and the font colors do not change.

editor.comment1.style = #223344,plain
editor.comment2.style = #abcdef,plain

It seems these settings may be for IDE 2.0. Is the syntax different for IDE 1.8?

The previous post (dated 2021) on the same subject does not help.

This is really aggravating and has been going on for many years. Why hasn't it been fixed yet?

They are two separate things.

Theme settings are stored the theme.txt file.

Various settings are stored in the preferences.txt file, but it does not contain any theme settings.

It works fine to me. You must restart Arduino IDE after closing all open windows after you edit the theme.txt file before the changes will take effect. If you haven't done that already, please restart Arduino IDE and then let us know whether you still have the problem.

There is one other possible cause of the problem you report, but it is a little more complex to explain so I would wait to first see whether the restart resolves the problem.

Neither of those files is used by Arduino IDE 2.x so any information you find about them is for Arduino IDE 1.x.

You might find the documentation here to be useful:

https://github.com/per1234/themetest#editing-the-arduino-ides-theme

By "this", are you referring to the theme colors making the IDE less accessible to some users who have visual impairments? If so, you'll be happy to learn that two "high contrast" themes are pre-installed in Arduino IDE 2.x specifically to improve accessibility to visually impaired users.

Thank you for a quick response.

To be sure, I rebooted the computer after making the changes to the theme.txt file in the Program Files (x86) folder. Nothing changed.

As a side note, it is not obvious to me if the editor's colors are part of a theme, or a preference, so that's why I tried both.

Here is a screenshot of the editor to the left (everything in the editor window is a comment in this screenshot) and my text editor to the right.

I cannot imagine anyone would think they are equally legible, but regardless it is my opinion that the left is considerably worse in legibility. It is very tiring to look at after a while, and no, while I am older, I do not have visual impairments. Thank you for the suggestion. If I did, I would have indicated so. But I may work hours a day on a project and ergonomics are important to me. While it can be, at times, a hobby, it is also my job.

I understand IDE 2.x has a more convenient way to deal with this, indicating that a need was identified. I actually have taken advantage of it as you can see below a comparison between 2.0.1 (left) and 1.8.16 (right). I was able to change the font size and colors of 2.0.1 so it is much more legible.

Unfortunately the IDE 2.x does not install on my work machine, apparently due to the corporate firewall (and looking at the concurring messages I got in response to my posting on this forum about that other problem, I am not alone with 2.x problems behind a firewall, while the older 1.8.16 runs fine). Therefore I have standardized on the older 1.8.16 which works in both places.

I know the IDE is reading (and saving) the theme.txt file because my text editor lets me know the file has been updated in the background, but apparently the settings I added are not used in any way.

So in summary I made no progress :frowning:

There is an alternative location where themes can be installed. If you installed a theme to that alternative location at some point, that theme will be used instead of the theme from C:\Program Files (x86)\Arduino\lib\theme\. That is a possible explanation of why the changes you are making have no effect in the IDE.

Please try this:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Take note of the path shown in the "Sketchbook location" field of the "Preferences" dialog.
  3. Click the "Cancel" button.
  4. Open the folder at the "Sketchbook location" path in Windows "File Explorer".

Please reply here on this forum topic to tell me if you see a folder named theme under the sketchbook folder.

Of the two computers I just tried at home, neither have the theme folder where the projects are.
They both point to C:\Users\User\Documents\Arduino which is where I place the projects and the libraries.

The plot thickens :slight_smile:
Thank you for trying to help, it is a bit frustrating.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.