如何在 Ubuntu 20.04 中更改文件夹颜色
主题
![](/data/attachment/album/202006/13/133146y1bjzb73jj141143.jpg)


[Ubuntu 20.04](https://itsfoss.com/download-ubuntu-20-04/) 中默认的 Yaru 主题赋予它优美、现代的外观。默认 Yaru 主题中的文件夹是紫色的外观，以与 Ubuntu 的品牌保持一致。


如果你不喜欢紫色，可以在 Ubuntu 中自由更改颜色主题。你可以更改 Ubuntu 的主题以使其有不同的颜色，但这将意味着放弃 Yaru 主题。


如果你只想在 Ubuntu 20.04 中更改文件夹的颜色，可以有两种方法：


* 为选定的文件夹赋予不同的颜色和标志（以便更好地组织文件和文件夹）
* 通过更改 Yaru 颜色主题来更改所有文件夹的颜色


让我向你展示两种方法。


### 更改所选文件和文件夹的颜色和标志


![](/data/attachment/album/202006/13/132219ij4jamaes8ejgumb.png)


我知道有些人将他们的文件夹使用不同的颜色或放在不同的位置，来表示工作正在进行中还是待处理或已完成。


如果你也是这样的，那么可以使用 [Folder Color 工具](https://foldercolor.tuxfamily.org/)更改文件夹的颜色。你还可以在文件夹中添加标志（绿色的勾号表示完成，加号表示新的，感叹号表示重要等）。你可以在上一张图片中看到一些例子。


你还可以在文件上使用 “Folder Color” 工具。你不能更改文件图标的颜色，但可以添加标志。


如果你在 Ubuntu 20.04 中[使用 Yaru 主题](https://itsfoss.com/ubuntu-community-theme/)，你可以使用[官方 PPA](https://launchpad.net/folder-color)：



```
sudo add-apt-repository ppa:costales/yaru-colors-folder-color

```

现在，使用 Yaru 兼容包安装 Folder Color。



```
sudo apt install folder-color yaru-colors-folder-color

```

安装后，你必须使用 `nautilus -q` 命令重启 Nautilus 文件管理器。之后，你可以进入文件管理器，右键单击文件夹或文件。你会在上下文菜单中看到 Folder Color 的选项。你将在此处看到颜色和标志选项。


![](/data/attachment/album/202006/13/132239cm3ppkrp991pece2.png)


你还可以通过在菜单**通过选择“默认”恢复原始文件夹颜色**。


对于 Ubuntu 18.04 或更早版本，可以从软件中心安装 Folder Color。它还可用于 Linux Mint/Cinnamon 桌面的 Nemo 文件管理器和 MATE 桌面的 [Caja 文件管理器](https://github.com/mate-desktop/caja)。


#### 如何删除 Folder Color？


如果你不想使用 Folder Color，你可以删除应用并删除 PPA。首先删除该应用：



```
sudo apt remove folder-color yaru-colors-folder-color

```

现在[删除 PPA](https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/)：



```
sudo add-apt-repository -r ppa:costales/yaru-colors-folder-color

```

### Yaru Colors 主题包更改 Yaru 主题颜色


![](/data/attachment/album/202006/13/132334m0u1ug0a9wy1pwag.jpg)


如果你想继续使用 Yaru 主题但使用不同的颜色，那么需要[Yaru Colors 主题包](https://github.com/Jannomag/Yaru-Colors)。


Yaru Colors 由 12 种 Yaru 颜色变体组成。它们浅绿色、蓝色、棕色、深蓝色、绿色、灰色、MATE 绿、橙色、粉红色、紫色、红色和黄色。


主题包括 GTK 主题、图标、光标和 GNOME Shell 主题。


* 图标：更改文件夹的强调色
* GTK 主题：更改应用窗口的强调色
* 光标主题：向光标添加几乎可以忽略的色彩轮廓
* GNOME Shell 主题：更改消息托盘和系统托盘中的强调色


你可以从它的 GitHub 仓库下载 Yaru Colors 主题包：


#### 下载 Yaru Colors 主题包


在提取内容时，你会发现图标、主题文件夹，这两个文件夹都包含上述十二种颜色。你可以分别在 `~/.local/share/.icons` 和 `~/.local/share/themes` 文件夹中复制图标和主题文件夹。


如果你不想亲自复制，那么你可以在解压文件夹中找到 `install.sh` 脚本。你可以运行它来通过交互式终端会话安装全部或选定的几个主题。


![](/data/attachment/album/202006/13/132421skqa0z3d0kkq0hhw.png)


要更改 GNOME Shell 主题，你必须[使用 GNOME Tweak 工具](https://itsfoss.com/gnome-tweak-tool/)。你也可以使用 GNOME Tweak 将图标和主题更改回默认。


![](/data/attachment/album/202006/13/132506ihtrragsp4qgps54.png)


享受为你的 Ubuntu 生活增色 ?




---


via: <https://itsfoss.com/folder-color-ubuntu/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[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)

The default Yaru theme in Ubuntu gives it a polished, modern look. The folders in the default Yaru theme have a purple-aubergine touch to keep in line with the branding of Ubuntu.

If you are not a fan of the purple shade, you have the freedom to change the color theme in Ubuntu.

You may change the theme of Ubuntu to give it a different color, but that would mean ditching Yaru theme.

If you just want to change the folder color in Ubuntu, there are two ways to do that:

- Give a different color and emblem to selected folders (for better organizing the files and folders)
- Change the colors for all folders by changing the Yaru color theme

Let me show you both methods.

## Change folder colors and emblem for selected files and folders

![Folder Icons, after applied the different colors](https://itsfoss.com/content/images/2023/09/Folder-color-applied-1.png)

I know that some people keep their folders in different color/location to indicate whether a work is in progress or pending or completed.

If you are one of those people, you can use the Folder Color utility and change the color of the folders. You may also add emblem to the folders (the green tick sign for competition, + sign for new, exclamation mark for important etc.). You can see some examples in the previous image.

Furthermore, you can also use the Folder Color utility on files. You cannot change the color files icons, but you can add emblems to them.

If you are [using Yaru theme](https://itsfoss.com/ubuntu-community-theme/) in Ubuntu, you can use the official PPA:

```
sudo add-apt-repository ppa:costales/yaru-colors-folder-color
```


Now install Folder Color with Yaru compatibility package.

```
sudo apt update
sudo apt install folder-color yaru-colors-folder-color
```


Once installed, you’ll have to restart Nautilus file manager using `nautilus -q`

command. After that, you can go to the file manager, right-click on a folder or file. You’ll see a Folder’s Color option in the context menu. You’ll see the color and emblem options here.

![](https://itsfoss.com/content/images/2023/09/add-color-or-emblem-to-folder.png)

Likewise, you can also restore the original folder color by choosing Default in the menu.

![](https://itsfoss.com/content/images/2023/09/color-back-to-default.png)

Folder Color is also available to install from the software center, but it won't keep the Yaru icon theme intact.

If you want that, install it using:

```
sudo apt install folder-color
```


![](https://itsfoss.com/content/images/2023/09/yaru-icons-not-intact.png)

The Folder Color utility is also available for Linux Mint/Cinnamon desktop’s [Nemo file manager](https://itsfoss.com/nemo-tweaks/) and MATE desktop’s [Caja file manager](https://github.com/mate-desktop/caja?ref=itsfoss.com).

### How to remove Folder Color tool?

If you don’t want to use Folder Color, you may remove the app and delete the PPA. First remove the app:

```
sudo apt purge folder-color yaru-colors-folder-color
sudo apt autoremove
```


Now [remove the PPA](https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/):

```
sudo add-apt-repository -r ppa:costales/yaru-colors-folder-color
```


## Change the color variant of Yaru theme

![](https://itsfoss.com/content/images/2023/09/Colors-applied.webp)

From Ubuntu 22.04, you can use the default Accent Color feature on system settings to use a different color variant of Yaru Icon theme.

You can select from 10 different accent colors, like Orange, Olive, Blue, Purple, Magenta, etc.

If you are doing it using system settings, open the Settings app and go to Appearance tab. From there, click on any of the accent color you want.

![](https://itsfoss.com/content/images/2023/09/set-accent-color-from-settings.png)

Or you can do the same with GNOME Tweaks. Open Tweaks and go to the Appearance Tab. You can change the following.

- Icons - Changes the accent color of folders
- Applications - Changes the application windows
- Cursor theme - Adds an almost negligible colored outline to the cursor
- GNOME Shell theme - Changes the accent color in the message tray and system tray

![](https://itsfoss.com/content/images/2023/09/apply-themes-using-tweaks.png)

## Yaru Colors theme pack for Ubuntu 20.04 (and older)

If you want to keep on using Yaru theme but with a different color variant, [Yaru Colors theme pack](https://github.com/Jannomag/Yaru-Colors?ref=itsfoss.com) is what you need.

Yaru Colors consists of 12 color variants of Yaru. The colors are aqua, blue, brown, deep blue, green, gray, MATE green, orange, pink, purple, red and yellow.

You can download Yaru Colors theme pack from its GitHub repository:

When you extract the content you’ll find icons, Themes folders and both of these folders contains the twelve mentioned color variants. You can copy the icons and Themes folder in `~/.local/share/.icons`

and `~/.local/share/themes`

folders respectively.

If you are not comfortable doing it all by yourself, you’ll find the `install.sh`

shell script in the extracted folder. You can run it to install all or selected few themes via an interactive terminal session.

![](https://itsfoss.com/content/images/2023/09/Yaru-colors-Installer-Script.png)

The installer will ask if you want to change the theme on the go or not.

You may also [use GNOME Tweak](https://itsfoss.com/gnome-tweak-tool/) to change the icons and themes back to the default ones.

Enjoy adding color to your Ubuntu life :)