Howto change fonts color of text fields in Linux Mint 19

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
goebbe
Level 1
Level 1
Posts: 16
Joined: Sun Jun 02, 2013 8:29 am

Howto change fonts color of text fields in Linux Mint 19

Post by goebbe »

This is a small "howto change the color of text" in text view.
This will change the color from Gray to Black - for example in the text editor Xed.

Background:
- Linux Mint 19 uses Gray fonts on white background as default for text view - which leads to bad contrast.
- If you want to change the color there is no easy way - since the color is defined in the theme.
- This howto should guide you through the steps to change the default color of textview.
- In this guide I adapt the default theme of Linux Mint 19 and set the color from Gray to Black.

1. Copy and rename the theme Mint-Y to the hidden .themes folder in your home directory:

Code: Select all

cp -r /usr/share/themes/Mint-Y ~/.themes/Mint-Y-blackfonts
2. Open the gtk.css file with the text editor:

Code: Select all

xed ~/.themes/Mint-Y-blackfonts/gtk-3.0/gtk.css
3. Find the place where the color for textview can be edited:
CTRL-F "textview text"

4. Change the color code in the next line from Gray to Black:
original:

Code: Select all

  color: #4a4a4a;
changed:

Code: Select all

  color: #000000;
Save the file.

5. Choose the new theme wit dark text in the System Settings of Linux Mint 19:

Menu > System Setting> Themes > Controls
Choose the Mint-Y-blackfonts theme

6. Open Xed and type some text to see dark black fonts on white background.

Screenshot with default colors:
Screenshot_default_color.png
Screenshot with black colors:
Screenshot_blackfonts.png
Comments and suggestions are welcome.
goebbe
Level 1
Level 1
Posts: 16
Joined: Sun Jun 02, 2013 8:29 am

Re: Howto change fonts color of text fields in Linux Mint 19

Post by goebbe »

Just in case you want to make the Theme with black fonts available to all users of your system, the following instructions might help you.

Side effect: The black fonts and themeing is also available for root, e.g. if you use the "Open as Root" option in Nemo.

To achieve this, you have to copy and rename the theme in /usr/share/theme and edit the file as administrator:

Replace 1. by:

Code: Select all

sudo cp -r /usr/share/themes/Mint-Y /usr/share/themes/Mint-Y-blackfonts
Note that now "sudo" is required!

Replace 2. by:

Code: Select all

xed admin:///usr/share/themes/Mint-Y-blackfonts/gtk-3.0/gtk.css
Now we ad "admin://" and the path to the new theme.

Steps 3. to 6. are the same as in the first post.
joyang90

Re: Howto change fonts color of text fields in Linux Mint 19

Post by joyang90 »

This is neat, thanks!
Post Reply

Return to “Tutorials”