Scratch comes with several color schemes by default. I can choose between them in Preferences > Interface. How can I add my own custom color schemes?
1 Answer
Scratch is using the same technology (which is named gtksourceview
) as gedit (the text editor for the GNOME desktop) and is therefore using the way of defining color schemes (also named themes or styles in different places).
All color schemes are defines as XML files, located at /usr/share/gtksourceview-3.0/styles/
. You can either create a copy of an existing color scheme (via sudo cp <existing scheme> <new scheme name>
in the mentioned folder) and modify the scheme according to your wishes, or you can download additional schemes from the GNOME project's page about GtkSourceView style schemes and place them in /usr/share/gtksourceview-3.0/styles/
.
-
This doesn't seem to work anymore. Anything I do just makes everything black and white. Jun 19, 2017 at 15:48
-
unless you desperately need the styles globally, e.g. for every user, on you system i'd suggest you put them into
~/.local/share/gtksourceview-3.0/styles
.– glaszAug 5, 2018 at 1:06