# هل يمكنني القيام بألوان اسم مستخدم متدرجة؟

**URL:** <https://meta.discourse.org/t/can-i-do-gradient-username-colors/236151>\
**Category:** Support\
**Created:** [14 أغسطس 2022، 6:04م UTC](https://meta.discourse.org/t/can-i-do-gradient-username-colors/236151 "2022-08-14T18:04:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)\
**Post date:** [14 أغسطس 2022، 6:53م UTC](https://meta.discourse.org/t/can-i-do-gradient-username-colors/236151/2 "2022-08-14T18:53:29Z")

</div>

Hello,

In here it seems to the `Premium` is the user primary group and the other part is works only for moderators. I think this is why is not working for you.

```scss
.names {
  // This part is works only for users who's primary group is Premium
  span.Premium a {
    background: linear-gradient(to right,#BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  // This part is works only for moderators
  span.moderator a::after {
    content:"★";
    margin-left: 2px;
  }
}

```

* * *

If you want to appear it for everyone that you shouldn’t use any group. So remove the `Premium` word will fix this.

```scss
.names {
  // This part is works for everyone
  span a {
    background: linear-gradient(to right,#BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  // This part is works only for moderators
  span.moderator a::after {
    content:"★";
    margin-left: 2px;
  }
}

```

![Screenshot 2022-08-14 at 20.51.41](https://global.discourse-cdn.com/meta/original/4X/8/a/4/8a469741b4440df9687b595519b524a4c97f6a24.png)

Now I am moderator too so the ⭐ is also appear.

![Screenshot 2022-08-14 at 20.52.05](https://global.discourse-cdn.com/meta/original/4X/6/0/3/6039116ad3b9954a201ce5c8f7c437180be59780.png)

* * *

If you want to restrict it for groups than you can follow the default code you shared but change the `Premium` word to your group name and don’t forget to set to make group for primary to members. 🙂

Like this 🔽

```scss
.names {
  // This part is works only for users who's primary group
  span.group_name a {
    background: linear-gradient(to right,#BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  // This part is works only for moderators
  span.moderator a::after {
    content:"★";
    margin-left: 2px;
  }
}

```

---

_[View the full topic](https://meta.discourse.org/t/can-i-do-gradient-username-colors/236151)._
