安装和使用额外的 Gedit 颜色主题
![](/data/attachment/album/202308/16/163130bj49du9xuxn1ujsm.jpg)



> 
> 不喜欢 Gedit 文本编辑器的默认外观？当然可以尝试更改颜色主题。以下是更改方法。
> 
> 
> 


Gedit 是 Linux 世界中最流行的文本编辑器之一。它主要是一个文本编辑器，但 [经过一些调整](https://itsfoss.com/gedit-tweaks/)，你也可以使用它进行编写程序。


现在，程序员通常更喜欢较暗的主题，Gedit 对此并不陌生。它有很多主题可供选择。


但是，如果你对它们不满意，你也可以安装第三方配色方案。如果需要，你甚至可以创建自己的配色方案，使其完全独一无二。


首先让我向你展示如何更改默认的 Gedit 主题，然后我将分享如何安装其他第三方主题。


### 更改默认的 Gedit 主题


正如我之前提到的，Gedit 带有一些自己的配色方案。你可以轻松切换到它们。


转到右上角的菜单并选择 “<ruby> 首选项 <rt>  Preferences </rt></ruby>”。


![Select Preferences from the top-right hamburger menu](/data/attachment/album/202308/16/163202iaxa8je4zj8jj8fp.png)


现在，转到字体和颜色选项卡。


![Select the Fonts & Colors tab in the preferences section for changing colors](/data/attachment/album/202308/16/163202adb3g5wwf1mmwze1.png)


在这里，你可以更改配色方案。你可以在下面的截图中看到所有配色方案的外观。


![Classic](/data/attachment/album/202308/16/163203nrtghpuyxpzybhyy.png)


![Cobalt](/data/attachment/album/202308/16/163203yqqdr6c9cdfcazxa.png)


![Kate](/data/attachment/album/202308/16/163203og5r1g2b1hezana1.png)


![Oblivion](/data/attachment/album/202308/16/163204zs77oeededo9899e.png)


![Solarized Dark](/data/attachment/album/202308/16/163204cq845nd8s46e3m46.png)


![Solarized Light](/data/attachment/album/202308/16/163204mshk7c767cdu44qa.png)


![Tango](/data/attachment/album/202308/16/163205dpukmki4no4qzcf2.png)


![Yaru](/data/attachment/album/202308/16/163205tza9xmo2w55fnq23.png)


![Yaru Dark](/data/attachment/album/202308/16/163205ldf8fx8gtwl6zzlu.png)


不喜欢你所看到的？ 让我们探索一下第三方 Gedit 主题。


### 安装第三方配色方案


你需要先从互联网下载所需的配色方案文件，然后从首选项将它们添加到 Gedit 或将它们放在 `.local/share/gedit/styles` 文件夹中。


#### 步骤 1：下载配色方案文件


第三方 Gedit 主题可在各种 GitHub 仓库中找到。为了你的方便，我列出了一些仓库，你可以在其中找到很多方案文件。


* [Mig 的方案](https://github.com:443/mig/gedit-themes)（更好看）
* [gmate 的方案](https://github.com:443/gmate/gmate/tree/master/styles)
* [GNOME Wiki](https://wiki.gnome.org:443/Projects/GtkSourceView/StyleSchemes)
* [其他仓库](https://github.com:443/topics/gedit-theme)
* [Gnome 外观](https://www.gnome-look.org:443/browse?cat=279&ord=latest)


在上面的仓库中，你可以找到 XML 文件。打开主题 XML 文件并使用 *将文件另存为原始数据* 选项下载它们，如下所示。


![Download XML files for Gedit themes](/data/attachment/album/202308/16/163237ii4nwk4kwvikz0yl.png)


#### 步骤 2：安装单独的主题文件


如果你精心挑选了一些主题文件，你可以使用 Gedit 添加方案功能一一安装它们。为此，请打开 “<ruby> 首选项 <rt>  Preferences </rt></ruby> > <ruby> 字体和颜色 <rt>  Fonts &amp; Colors </rt></ruby>” 选项卡。现在，单击左下角的 “+” 符号：


![Click on the "+" sign on Fonts & Colors page for adding individual XML files](/data/attachment/album/202308/16/163237uf3qd8afvn6madmy.png)


从文件浏览器中，选择下载的主题文件，然后单击“<ruby> 确定 <rt>  OK </rt></ruby>”。


!["Neon", a newly installed theme](/data/attachment/album/202308/16/163238lpqpmpzucbp7u0mw.png)


该主题现在将在同一“字体和颜色”选项卡上可见，你可以通过单击它进行切换。


#### 步骤 2 替代：批量安装主题


你是否下载了整个 GitHub 主题仓库？ 那么一一安装主题就不方便了。不用担心，Gedit 有可用于批量安装的颜色主题目录。


你必须将所有 XML 文件复制并粘贴到 `.local/share/gedit/styles`。


之后，你将在“字体和颜色”选项卡上获得所有主题的缩略图。


![Fonts & Colors tab will list all the user installed third partyy themes, that are available for switching](/data/attachment/album/202308/16/163238zatbda2gk6s45kw4.png)


如果没有 `styles` 目录，请创建一个。现在，主题将可供该特定用户使用。



> 
> ? 在 Linux Mint 上，你可以将 XML 文件复制到 `/usr/share/gtksourceview-3.0` 目录，Gedit 和 Xed 编辑器都可以访问该目录。
> 
> 
> 


### 删除 Gedit 主题


如果你不喜欢某些主题，可以从该位置删除这些文件。或者，转到字体和颜色部分。现在选择你要删除的主题，然后按左下角的 “-” 号。


![Select theme that you want to remove from the list and press "-" button](/data/attachment/album/202308/16/163238exbjcncqg113j0j0.png)


这将删除该特定的配色方案。


### 一些好看的 Gedit 主题


下面的截图给出了我的一些建议。


Blackboard：


![Blackboard (gmate)](/data/attachment/album/202308/16/163238dkhhtt88ktikb8z1.png)


[Catppuccin](https://github.com:443/catppuccin/gedit) 是一个深色的 Gedit，如果你使用任何类似的 GTK 主题，那就太合适了：


![Catppuccin](/data/attachment/album/202308/16/163239dpy9np9y1borohmp.png)


Lowlight：


![Lowlight theme from gmate](/data/attachment/album/202308/16/163239u5sa57rxrzyr4ucv.png)


Midnight：


![Midnight (gmate)](/data/attachment/album/202308/16/163239dc36mhlx60lhc253.png)


Monakai：


![Monakai (gmate)](/data/attachment/album/202308/16/163240l1zw03jejgkzwjqj.png)


Neopro：


![Neopro theme from gmate](/data/attachment/album/202308/16/163240ec1llcsrjebnx9xs.png)


Plastic Code Wrap：


![Plastic Code Wrap theme from gmate](/data/attachment/album/202308/16/163241mpkzkkr9qa9au9a0.png)


Slate：


![Slate (gmate)](/data/attachment/album/202308/16/163241zrnvo9lmd8ztolg9.png)


Vibrant Fun：


![Vibrant Fun (gmate / mig)](/data/attachment/album/202308/16/163241sejf922ff9h9rfeg.png)


你可以通过搜索 [GitHub 话题](https://github.com:443/topics/gedit-theme) 和仓库来获取更多主题。


### 更多 Gedit 调整


这只是众多 [调整 Gedit 的方法](https://itsfoss.com/gedit-tweaks/) 之一。这里还有更多内容供你探索。


享受更多颜色的 Gedit ?


*（题图：MJ/3a36db2e-6da6-4bdc-bf80-0aa0e6481f8e）*




---


via: <https://itsfoss.com/gedit-themes/>


作者：[Sreenath](https://itsfoss.com/author/sreenath/) 选题：[lkxed](https://github.com/lkxed/) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

Gedit is one of the most popular text editors in the Linux world. It is primarily a text editor but [with some tweaks](https://itsfoss.com/gedit-tweaks/), you can use it for programming as well.

Now, programmers often prefer a darker theme and Gedit is no stranger to that. It comes with a bunch of themes to choose from.

However, if you are not satisfied with them, you may also install third-party color schemes. If you want, you can even create your own color scheme to make it completely unique.

Let me show you how to change the default Gedit theme first and then I'll share how you can install additional, third-party themes.

## Change the default Gedit theme

As I mentioned earlier, Gedit comes with a few color schemes of its own. You can easily switch to them.

Go to the top right hamburger menu and select* Preferences.*

![Select Preferences from the top-right hamburger menu](https://itsfoss.com/content/images/2023/07/select-preferences.png)

Now, go to Fonts & Color Tab.

![Select the Fonts & Colors tab in the preferences section for changing colors](https://itsfoss.com/content/images/2023/07/Fonts-and-Colors-tab-change-default-themes.png)

From there, you can change the color scheme. You can see how all these color schemes look in the screenshots below.

![](https://itsfoss.com/content/images/2023/07/Default-Classic.png)

![](https://itsfoss.com/content/images/2023/07/Default-Cobalt.png)

![](https://itsfoss.com/content/images/2023/07/Default-Kate.png)

![](https://itsfoss.com/content/images/2023/07/Default-Oblivion.png)

![](https://itsfoss.com/content/images/2023/07/Default-Solarized-Dark.png)

![](https://itsfoss.com/content/images/2023/07/default-Solarized-Light.png)

![](https://itsfoss.com/content/images/2023/07/Default-tango.png)

![](https://itsfoss.com/content/images/2023/07/Default-Yaru.png)

![](https://itsfoss.com/content/images/2023/07/Default-Yaru-Dark.png)

Classic, Cobalt, Kate, Oblivion, Solarized Dark, Solarized Light, Tango, Yaru, Yaru Dark

Don't like what you see? Let's explore third-party Gedit themes.

## Installing third-party color schemes

You need to download the required color scheme files from the internet first and then add them to Gedit from the Preferences or put them in .local/share/gedit/styles folder.

### Step 1: Download color Scheme Files

Third-party Gedit themes are available on various GitHub repositories. For your convenience, I am listing some repos where you can find a lot of scheme files.

[Schemes by Mig](https://github.com/mig/gedit-themes)(better looking)[Schemes by gmate](https://github.com/gmate/gmate/tree/master/styles)[GNOME Wiki](https://wiki.gnome.org/Projects/GtkSourceView/StyleSchemes)[Other repos](https://github.com/topics/gedit-theme)[Gnome-Look](https://www.gnome-look.org/browse?cat=279&ord=latest)

On the above repos, you can find XML files. Open the theme XML files and download them by using the *Save File as Raw Data* option, as shown below.

![Download XML files for Gedit themes](https://itsfoss.com/content/images/2023/07/save-raw-data-1.png)

### Step 2: Install Individual Theme Files

If you have handpicked some theme files, you can install them one by one using Gedit Add scheme feature. For this, open the *Preferences > Fonts & Colors* tab. Now, click on the "+" symbol on the bottom left:

![Click on the "+" sign on Fonts & Colors page for adding individual XML files](https://itsfoss.com/content/images/2023/07/Select-plus-sign-to-add-schemes.png)

From the resulting file browser, select the downloaded theme file and click OK.

!["Neon", a newly installed theme](https://itsfoss.com/content/images/2023/07/newly-installed-theme.png)

This theme will now be visible on the same Fonts & Colors tab, and you can switch by clicking on it.

### Alternative step 2: Install Themes in Bulk

Did you download an entire GitHub repo of themes? Then it is not convenient to install themes one by one. Do not worry; Gedit has color theme directories that can be used for bulk installs.

You have to copy and paste all the XML files to `.local/share/gedit/styles`

.

After that you will get a thumbnail of all the themes on the *Fonts & Colors* tab.

![Fonts & Colors tab will list all the user installed third partyy themes, that are available for switching](https://itsfoss.com/content/images/2023/07/multiple-installed-themes.png)

If there is no *Styles* directory, create one. Now, the themes will be available for that particular user.

On Linux Mint, you can copy the XML files to `/usr/share/gtksourceview-3.0`

directory, which will be accessible for both Gedit and Xed editor.

## Remove a Gedit theme

If you don't like some themes, you can delete those files from the location. Or, go to the Fonts & Colors section. Now select the theme that you want to delete and press the "-" sign on the bottom left.

![Select theme that you want to remove from the list and press "-" button](https://itsfoss.com/content/images/2023/07/remove-a-theme.png)

This will delete that particular color scheme.

## Some good looking Gedit themes

The below screenshots give some suggestions from my side.

### Blackboard

![Blackboard (gmate)](https://itsfoss.com/content/images/2023/07/Blackboard.png)

### Catppuccin

[Catppuccin](https://github.com/catppuccin/gedit) is a dark Gedit them, good if you use any similar GTK theme.

![Catppuccin](https://itsfoss.com/content/images/2023/07/Catppuccin-macchiato.png)

### Lowlight

![Lowlight theme from gmate](https://itsfoss.com/content/images/2023/07/Lowlight.png)

### Midnight

![Midnight (gmate)](https://itsfoss.com/content/images/2023/07/Midnight.png)

### Monakai

![Monakai (gmate)](https://itsfoss.com/content/images/2023/07/Monakai.png)

### Neopro

![Neopro theme from gmate](https://itsfoss.com/content/images/2023/07/Neopro.png)

### Plastic Code Wrap

![Plastic Code Wrap theme from gmate](https://itsfoss.com/content/images/2023/07/Plastic-code-wrap.png)

### Slate

![Slate (gmate)](https://itsfoss.com/content/images/2023/07/slate.png)

### Vibrant Fun

![Vibrant Fun (gmate / mig)](https://itsfoss.com/content/images/2023/07/Vibrant-fun.png)

You can get more themes by searching on [GitHub topics](https://github.com/topics/gedit-theme) and repositories.

## More Gedit tweaks

That's just one of the many [ways you can tweak Gedit](https://itsfoss.com/gedit-tweaks/). Here are some more for you to explore.

[10 Tweaks to Supercharge Gedit as Code EditorGedit is a good text editor. Turn it into a good code editor with these tips, tricks and tweaks.](https://itsfoss.com/gedit-tweaks/)![](https://itsfoss.com/content/images/2023/04/tweaks-to-supercharge-gedit-editor.png)


![](https://itsfoss.com/content/images/2023/04/tweaks-to-supercharge-gedit-editor.png)

Enjoy Gedit in more colors :)