# 更改默认徽章颜色（青铜、银色、金色）

**URL:** <https://meta.discourse.org/t/change-default-badge-colors-bronze-silver-gold/273245>\
**Category:** Development\
**Tags:** badges\
**Created:** [2023年七月29日 19:26 UTC](https://meta.discourse.org/t/change-default-badge-colors-bronze-silver-gold/273245 "2023-07-29T19:26:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [2023年七月29日 20:22 UTC](https://meta.discourse.org/t/change-default-badge-colors-bronze-silver-gold/273245/2 "2023-07-29T20:22:27Z")

</div>

我不是 CSS 专家，但这是我的解决方案……只需从下方更改颜色，以更好地匹配您的主题颜色。我还建议阅读此主题，它过去对我非常有帮助，因为它帮助我学会了为我的网站做很酷的事情。

> [@Making custom CSS changes on your site](https://meta.discourse.org/t/make-css-changes-on-your-site/168101):
>
> bookmark This guide explains how to make CSS changes on your Discourse site, including an introduction to CSS, where to add CSS in Discourse, and how to find the right selectors using browser inspection tools. person_raising_hand Required user level: Administrator Summary This guide covers: A brief introduction to CSS and key concepts How to add CSS to your Discourse site using theme components Using browser inspection tools to find the right CSS selectors Understanding CSS basics C…

* * *

Bronze

```css
.badge-card .badge-contents .badge-icon.badge-type-bronze .fa {
    color: #cd7f32 !important;
}

```

Silver

```css
.badge-card .badge-contents .badge-icon.badge-type-silver .fa {
    color: silver !important;
}

```

Gold

```css
.badge-card .badge-contents .badge-icon.badge-type-gold .fa {
    color: #e7c300 !important;
}

```

---

_[View the full topic](https://meta.discourse.org/t/change-default-badge-colors-bronze-silver-gold/273245)._
