¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 ¿ªÔÆÌåÓý

Changing IDE colors


Jack Purdum
 

All:

If you want to change the color of something in the IDE, looks for the themes.txt file, which should be off the root directory at: \lib\theme\themes.txt. Make a copy first (e.g., originalthemes.txt) and then experiment with the colors of choice. I have a hard time seeing some of the colors the IDE uses (e.g., keywords) so I changed them. The colors are stated in RGB (nex) format. You can get an idea of the color values here:





Jack, W8TEE



From: 1practical.man <1practical.man@...>
To: [email protected]
Sent: Thursday, July 27, 2017 8:07 AM
Subject: Re: [BITX20] Adruino IDE Hacks For Old Eyes

ThAnks John! ?That's very informative and exceptionally well written

On Jul 27, 2017, at 07:50, John P <j.m.price@...> wrote:

I'm starting to get the hang of the Arduino IDE, but had one major issue with it; my old eyes couldn't read the code!
So I figured out how to change the fonts and make the IDE a whole lot easier to read. Here's how:
When you open the IDE, go to the "File" menu and select "Preferences". This opens a dialog box in which you can
change the values of a few of the parameters. At the bottom of the box, you will see a link to a file named
"preferences.txt", which has a bunch of parameters that you can change to suit your tastes.
Note that the text in the "Preferences" window tells you that you have to edit the file WITHOUT the IDE running.
This is because the IDE writes a new version of the file everytime it exits. So once you open "preferences.txt",
exit the IDE before editing.
To make the font much easier to read, change the following 2 lines as shown here:
???? editor.antialias=false
???? editor.font=Consolas,plain,16
I like the Consolas font, because it is naturally bolder than most, and it puts a slash through zeros. The 16 is
the size of the font to use. I tried changing "plain" to "bold", but that didn't seem to have any effect.
The line:
??? gui.scale=125
allows you to scale the whole window. You¡¯ll probably find it set to 100 in the default file. You can try different
combinations of the "gui.scale" parameter and "editor.font" to see what works best for you.
Another line that you might want to modify (or add, if not already there) near the bottom of the file is:
??? serial.line.ending=2
This determines what gets transmitted to the Adruino when you hit the Enter key or click the Send button in
the Serial Monitor; 0=Nothing, 1=New Line, 2=Carriage Return, 3=Both CR & NL. You can also change this
on the fly from a drop-down list at the bottom of the serial monitor window.
I was trying to use the input mode of the serial monitor and had this set for "both (3)"; that was causing all kinds
of goofy results in what I was trying to read!
There are also settings that allow you to change the default window sizes.
Once you have made the changes, save the file (note, I also made a copy of the original file, just in case). The next
time you open the IDE, the changes will take effect. You can then make any other preference changes in the
"Preferences" dialog box and exit the IDE again. Then all of your changes will be saved, and used the next time
you open the IDE.
The one thing I have not figured out how to change is the color of the font used for comments. That is still a bit
too light for my old eyes. If anyone knows how, please post.
Also if anyone knows any other cool hacks for the preferences, please let us know.

--
John - WA2FZW



Virus-free.


Vince Vielhaber
 

If you're running unix, the theme file will be in:

/<arduino-root-dir>/lib/themes/theme.txt

eg: /home/foobar/arduino/arduino-1.8.3/lib/theme/theme.txt

If you want to change the appearance of the comments, there are two things
to change: editor.comment1.style and editor.comment2.style.

editor.comment1.style is for comments that are started with //
editor.comment2.style is for comments inside of /* and */

The font color is defined as #RRGGBB in hex, as Jack pointed out,
followed by .plain or .bold or .italic

eg: editor.comment1.style = #777777.bold

will make the line:

// this is a comment

appear in bold dark gray.

Vince.

All:
If you want to change the color of something in the IDE, looks for the
themes.txt file, which should be off the root directory at:
\lib\theme\themes.txt. Make a copy first (e.g., originalthemes.txt) and
then experiment with the colors of choice. I have a hard time seeing some
of the colors the IDE uses (e.g., keywords) so I changed them. The colors
are stated in RGB (nex) format. You can get an idea of the color values
here:
HTML Color Picker


|
| |
HTML Color Picker
Well organized and easy to understand Web building tutorials with lots of
examples of how to use HTML, CSS, Java... | |

|



Jack, W8TEE

From: 1practical.man <1practical.man@...>
To: [email protected]
Sent: Thursday, July 27, 2017 8:07 AM
Subject: Re: [BITX20] Adruino IDE Hacks For Old Eyes

ThAnks John! ??That's very informative and exceptionally well written
On Jul 27, 2017, at 07:50, John P <j.m.price@...> wrote:


I'm starting to get the hang of the Arduino IDE, but had one major issue
with it; my old eyes couldn't read the code!So I figured out how to change
the fonts and make the IDE a whole lot easier to read. Here's how:When you
open the IDE, go to the "File" menu and select "Preferences". This opens a
dialog box in which you can
change the values of a few of the parameters. At the bottom of the box,
you will see a link to a file named
"preferences.txt", which has a bunch of parameters that you can change to
suit your tastes.Note that the text in the "Preferences" window tells you
that you have to edit the file WITHOUT the IDE running.
This is because the IDE writes a new version of the file everytime it
exits. So once you open "preferences.txt",
exit the IDE before editing.To make the font much easier to read, change
the following 2 lines as shown here:???????? editor.antialias=false
???????? editor.font=Consolas,plain,16I like the Consolas font, because it
is naturally bolder than most, and it puts a slash through zeros. The 16
is
the size of the font to use. I tried changing "plain" to "bold", but that
didn't seem to have any effect.The line:?????? gui.scale=125allows you to
scale the whole window. You?€?ll probably find it set to 100 in the
default file. You can try different
combinations of the "gui.scale" parameter and "editor.font" to see what
works best for you.Another line that you might want to modify (or add, if
not already there) near the bottom of the file is:??????
serial.line.ending=2This determines what gets transmitted to the Adruino
when you hit the Enter key or click the Send button in
the Serial Monitor; 0=Nothing, 1=New Line, 2=Carriage Return, 3=Both CR &
NL. You can also change this
on the fly from a drop-down list at the bottom of the serial monitor
window.I was trying to use the input mode of the serial monitor and had
this set for "both (3)"; that was causing all kinds
of goofy results in what I was trying to read!There are also settings that
allow you to change the default window sizes.Once you have made the
changes, save the file (note, I also made a copy of the original file,
just in case). The next
time you open the IDE, the changes will take effect. You can then make any
other preference changes in the
"Preferences" dialog box and exit the IDE again. Then all of your changes
will be saved, and used the next time
you open the IDE.The one thing I have not figured out how to change is the
color of the font used for comments. That is still a bit
too light for my old eyes. If anyone knows how, please post.Also if anyone
knows any other cool hacks for the preferences, please let us know.

--
John - WA2FZW




| | Virus-free. www.avast.com |

--
Michigan VHF Corp.


John P
 

On Thu, Jul 27, 2017 at 05:50 am, Jack Purdum wrote:
looks for the themes.txt file
Jack (et al),?the file is actually "theme'txt"; (no "s").
?
--
John - WA2FZW


Jack Purdum
 

Opps...sorry 'bout that.

Jack, W8TEE



From: John P <j.m.price@...>
To: [email protected]
Sent: Thursday, July 27, 2017 10:11 AM
Subject: Re: [BITX20] Changing IDE colors

On Thu, Jul 27, 2017 at 05:50 am, Jack Purdum wrote:
looks for the themes.txt file
Jack (et al),?the file is actually "theme'txt"; (no "s").
?
--
John - WA2FZW



 

Does anyone have an OldEyesTheme.txt to share? I'd like to minimize experimenting with the color chooser.

Thanks all for this great thread. The Arduino IDE has been a pain in my eyes for years.

73, Charlie K?TAN


John P
 

On Fri, Jul 28, 2017 at 09:41 am, <ckotan@...> wrote:
Does anyone have an OldEyesTheme.txt to share?
After making the changes to the font type, size and anti-aliasing that I mentioned in the other thread (Old Eyes), I personally found that the only thing I needed to change in the theme.txt file was the color for the /* . . .?*/ comments, which I just made the same as the // type comments. I have no trouble reading things now. But for what it's worth, here are my theme.txt and preferences.txt files:

--
John - WA2FZW