Skip to main content

Desired Outcome: Different color styling on the Category name in activity feeds.

For example, if I was building this for the GS community, I’d be trying to have the “Build Communities” and “Customer Success (CS)” category names below use two different colors. 

 

Anyone know how this might be done? I’d imagine it’s a Thirty Party Script if it’s possible at all. But I’m open to custom CSS too if that’s an option. (I’m out of my technical depth here)

 

 

Don’t have an answer to this but count me in to vote on it if it becomes a Product Idea. I imagine it could be similar to the look of Article labels and Idea statuses.


Loved the idea as well @DannyPancratz 

This should do the job, add it to your Third-party Scripts section on Control:

<script>
$(".topic-view_header-item_category-link:contains('Category Name')").css('color', 'red');

</script>

 


Nice idea @DannyPancratz 🙌, so much so we’ve implemented on our own community 😁


@leo-inspired Thank you! 

@olimarrio woah! Cool!!!


@leo-inspired in that script, you have the example color as ‘red’

But in your implementation here on the community, you’re using branded colors to match your theme. How do you specify those colors? Is it name of colors? Hexcodes? 

I’m outside of my technical depth when it comes to scripts, and I’m looking at how to specify the exact branded color I want for my use cases. 


CSS you can use either colors or hexcodes. On our community we used the hexcode on the script.

If you’d like to use your brand color, you’ll need to use inspect your homepage and find the colors you’re using. Or you can ask your design team which hexcodes they mostly use.

If you search on Google "Color picker css”, you’ll get a picker where you can mix colors and get the hexcode:
 

 


I have the hexcodes, thank you for the help!


Reply