Page 1 of 1

Howto change fonts color of text fields in Linux Mint 19

Posted: Thu Jul 19, 2018 4:32 pm
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.

- 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:

Code: Select all

  color: #4a4a4a;

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 with black colors:
Comments and suggestions are welcome.

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

Posted: Sun Jul 22, 2018 6:05 pm
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.

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

Posted: Tue Jul 24, 2018 9:15 am
by joyang90
This is neat, thanks!