Changing username colors

Is there currently any way to change the colors of usernames based on groups?
For example, I want to make the usernames of Admins show up red when they post, and moderators purple when they post?

1 Like

Yes you can do via CSS like below. But if you prioritized names in Discourse then only names will be colored. Also group must be chosen as “Primary Group” for that user.

.topic-post .admin a {
color: red;
}

.topic-post .moderator a {
color: purple;
}
5 Likes

Old bump, but super relevant – can I do the same css for custom groups? Eg, groups I made for Patreon linking I’d like to have a unique color.

Got it: Replace .admin .moderator with group_name, similarly. Or beyond just posts:

// TOP TAKES PRIORITY
.names {
  span.someGroup a  {
    color: #DC2E17;
  }
  span.someOtherGroup a {
    color: #DC2E17;
  }
}
5 Likes