Changing IDE fonts

I know this has been raised before but I'm using IDE 1.8.19 and have some difficulty with the colour used for comments which is almost optimised for poor visibility for people whose eyes are past their first youth!! In the previous thread it was pointed out that the colour can be edited in the file theme.txt in the lib folder but that doesn't work as the folder is locked so the modified file can't be saved. I would have thought that this would be an obvious user requirement for accessibility and should be available as a preference from the file menu (the font size is for example).

Is the latest IDO (2.0.x?) better in this respect? From what I've read it doesn't open the serial monitor in a separate window which is an absolute requirement in my view so I wouldn't want to upgrade until this was fixed.

Please could anyone suggest how to modify and save the theme file; and is this user selectable in V2, and if not could it be taken on board as a future requirement?

Many thanks!

Take a look at https://support.arduino.cc/hc/en-us/articles/4402771781522-How-to-change-IDE-text-font-settings

Thanks for that. Unfortunately the text colour is not defined in that file but in the theme file

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

which, though I can open it and edit , I can't save back to the same folder.

Aha! I fixed folder permissions and can now change and modify the theme file. So I copied a "colour" code but it had no effect when I reopened Arduino

Hi @jhaine

You'll be glad to learn that Arduino IDE 1.x supports the installation of themes to the sketchbook folder.

You have two options for installing themes to the sketchbook, direct installation or installation as "ZIP" files.

I'll provide instructions for both options below;


Direct installation

This installation option is best if you are going to use a single custom theme.

  1. Select File > Preferences from the Arduino IDE menus.
  2. Take note of the path shown in the "Sketchbook location" field.
    This is the path to your "sketchbook folder".
  3. Click the Cancel button.
  4. Select File > Quit from the Arduino IDE menus.
  5. Open the sketchbook folder in your file browser.
    If you are using Windows, this would be File Explorer.
  6. Create a subfolder in your sketchbook folder named theme.
  7. Put the theme directly into the theme folder you created.

The folder structure must look like this:

<sketchbook folder>
|_ theme
   |_ syntax
   |   |_ etc...
   |_ theme.txt
   |_ etc...

"ZIP" file installation

This installation option is best if you want to switch between multiple custom themes, or if you are using a pre-made theme that supports this installation method.
The second option is to put the theme in a "ZIP" file, then put that in the theme subfolder of the sketchbook folder.

  1. Select File > Preferences from the Arduino IDE menus.
  2. Take note of the path shown in the "Sketchbook location" field.
    This is the location of your "sketchbook folder".
  3. Click the Cancel button.
  4. Select File > Quit from the Arduino IDE menus.
  5. Open the sketchbook folder in your file browser.
    If you are using Windows, this would be File Explorer.
  6. Create a subfolder in your sketchbook folder named theme.
  7. Put the theme "ZIP" file directly into the theme folder you created.
  8. Start the Arduino IDE.
  9. Select File > Preferences from the Arduino IDE menus.
  10. Select the theme from the File > Preferences > Theme menu.
  11. Select File > Quit from the Arduino IDE menus.
  12. Start the Arduino IDE.
    The theme you selected from the menu will now be active.

The folder and "ZIP" file structure must look like this:

<sketchbook folder>
|_ theme
   |_ MyCoolTheme.zip
      |_ syntax
      |   |_ etc...
      |_ theme.txt
      |_ etc...

There is a sort of tricky thing about this installation option. The theme must be in the root of the "ZIP" file, NOT in a subfolder. Some "ZIP" utilities make that difficult or even impossible (especially the macOS one), but a Windows user won't have any difficulty:

  1. Select all the files of the theme in Windows File Explorer.
  2. Right click on the selected files.
  3. Select Send to > Compressed (zipped) folder from the context menu.

The awesome thing about this option is it allows you to have multiple themes installed (each in its own "ZIP" file). You can chose which one you prefer via the "Theme" menu of the Arduino IDE's File > Preferences dialog. This menu will include the option to select the "Default theme", which is the one installed with the IDE.

Let's say you had two themes, one you wanted to show up in the Theme menu as "MyCoolTheme" and another you wanted to show up as "MyOtherCoolTheme", the folder structure should look like this:

<sketchbook folder>
|_ theme
   |_ MyCoolTheme.zip
   |  |_ syntax
   |  |   |_ etc...
   |  |_ theme.txt
   |  |_ etc...
   |_ MyOtherCoolTheme.zip
      |_ syntax
      |   |_ etc...
      |_ theme.txt
      |_ etc...

For making bespoke modifications to the theme, no. Although it is possible to customize the theme (see this post for details), the Arduino IDE 2.x theme system requires you to install the custom theme to the Arduino IDE installation folder.

So if you are bound and determined to install the Arduino IDE to a location on your computer that has special security restrictions, even though doing that is completely optional since the IDE can be installed anywhere you like, then you won't find Arduino IDE 2.x to be friendly to customizing themes.

On the other hand, Arduino IDE comes with 5 different themes pre-installed, which can be selected from the File > Preferences menu. So if one of those happens to meet your needs out of the box, you would be in luck.

That is correct:

The plans are to redesign the Serial Monitor to be a separate window, but for now it is an integrated part of the Arduino IDE 2.x window.

Thanks for the information. So I should take my modified theme file from post #3 above and paste it in the sketchbook folder? I tried that and I'm afraid it doesn't change anything.

You must copy the entire theme folder.

Make sure to close any Arduino IDE windows you have open and then start it again after doing that. The IDE will only recognize the custom theme after a restart.

OK, I tried that and I'm afraid it doesn't work. I have been able to make the comments more readable by using a bigger font which helps. Thanks for the suggestions.

It is unfortunate you weren't able to get it working. I can assure you that installing custom themes does work perfectly well if you do it correctly, but I also understand that is challenging to accomplish.

Well, I'm glad you found a solution in the end anyway. If you ever decide to give another try at a custom theme, feel free to ask for assistance here on the Arduino forum.

I will, thanks. I wonder if an "accessibility" review has been done of the IDE to check various aspects of the UX?

Nothing formal. Members of the community, including some who have qualifications in this area, have provided valuable feedback and assistance for the Arduino IDE 1.x project and 2.x as well.

You can see the accessibility-related issues for the actively developed Arduino IDE 2.x project here:

https://github.com/arduino/arduino-ide/issues?q=label%3A"topic%3A+accessibility"+

Thanks - how can my issue be added to this please? I'm sure that I'm not the only person suffering with eyes that are 70+ years old! I think the current choice of comment colour is very non-optimum probably for anyone. I wonder how people with dyslexia get on, I believe that they can be sensitive to text colour?

How about this "High Contrast" theme that comes preinstalled in Arduino IDE 2.x? Does that meet your requirements?

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