# 如何更改文本的颜色？

**URL:** https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167
**Category:** Support
**Created:** [2024年四月10日 01:45 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167 "2024-04-10T01:45:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![WolfTech\_Gimkit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wolftech_gimkit/32/376664_2.png) [@WolfTech\_Gimkit](https://meta.discourse.org/u/WolfTech_Gimkit)
#### Post date: [2024年四月10日 01:45 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/1 "2024-04-10T01:45:07Z")

</div>

我看到有一种方法可以更改文本周围的突出显示，但这不起作用。但是，有没有办法更改文本本身的颜色，而不是背景的颜色？

---

<div class="post-metadata">

### Author: ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)
#### Post date: [2024年四月10日 09:08 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/2 "2024-04-10T09:08:46Z")

</div>

您能写下您的网站并用截图显示是哪个文本区域吗？

---

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [2024年四月10日 10:53 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/3 "2024-04-10T10:53:56Z")

</div>

`\u003cmark\u003eyour text here\u003c/mark\u003e` 会为文本添加高亮。或者，您也可以查看这个插件？

> [@Discourse BBCode](https://meta.discourse.org/t/discourse-bbcode/65425):
>
> information_sourceSummary Discourse BBCode adds the ability to use BBCode to format posts.discourse2Hosted by us? This plugin is available on our Enterprise plansmechanicSelf-host Install [Install plugins on a self-hosted site](https://meta.discourse.org/t/install-plugins-on-a-self-hosted-site/19157)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-bbcode](https://github.com/discourse/discourse-bbcode) The Discourse BBCode plugin enhances the Markdown composer [[1]](#footnote-304175-1) with support for the [BBCode syntax](https://www.bbcode.org/reference.php) beyond what is included by default (i.e. [i], [b], [s], [u], […

或者这个主题组件？

> **[GitHub - merefield/discourse-tc-coloured-text: A simple Theme Component alternative to the BBCode...](https://github.com/merefield/discourse-tc-coloured-text)**
>
> A simple Theme Component alternative to the BBCode colouring plugin

---

<div class="post-metadata">

### Author: ![WolfTech\_Gimkit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wolftech_gimkit/32/376664_2.png) [@WolfTech\_Gimkit](https://meta.discourse.org/u/WolfTech_Gimkit)
#### Post date: [2024年四月10日 23:59 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/4 "2024-04-10T23:59:31Z")

</div>

就是普通的文本，就像我现在写的这样。但这里有一个论坛链接。我不是它的所有者: +1:

> **[Gimkit Creative](https://forum.creative.gimkit.com/)**
>
> Get help building your own maps & worlds in Gimkit Creative!

---

<div class="post-metadata">

### Author: ![WolfTech\_Gimkit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wolftech_gimkit/32/376664_2.png) [@WolfTech\_Gimkit](https://meta.discourse.org/u/WolfTech_Gimkit)
#### Post date: [2024年四月11日 00:00 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/5 "2024-04-11T00:00:27Z")

</div>

我会尝试一下，看看是否能让它工作。不过还是谢谢你。

---

<div class="post-metadata">

### Author: ![bryce](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bryce/32/377822_2.png) [@bryce](https://meta.discourse.org/u/bryce)
#### Post date: [2024年四月11日 00:31 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/6 "2024-04-11T00:31:25Z")

</div>

默认情况下，正文文本（如本例所示）会使用当前主题的“primary”颜色进行着色。管理员可以通过以下路径进行更改：

**Preferences -\u003e Admin -\u003e Customize**

1. 点击“Add Color Scheme”或选择现有方案进行编辑。
2. 点击颜色方案名称旁边的编辑图标。
3. 点击任何颜色字段以选择不同的颜色。

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/6/9/069af4817aee91aa0767a3eb70bd4d7bf31da3a8.png)

需要注意的是，站点的许多其他部分也从“primary”颜色获取颜色，因此更改此设置可能会产生不希望的副作用。可以使用 CSS 规则为特定部分更直接地设置颜色。

---

<div class="post-metadata">

### Author: ![WolfTech\_Gimkit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wolftech_gimkit/32/376664_2.png) [@WolfTech\_Gimkit](https://meta.discourse.org/u/WolfTech_Gimkit)
#### Post date: [2024年四月11日 01:57 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/7 "2024-04-11T01:57:14Z")

</div>

好的，我只是不知道是否有你可以用于某个主题的 JavaScript 脚本。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2024年五月11日 01:58 UTC](https://meta.discourse.org/t/how-do-you-change-the-color-of-text/303167/8 "2024-05-11T01:58:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
