Recently, I go through a scenario where I need to showcase different colors when a value of a custom field lies in a particular range for example.
We have a Rating Field over Account with API name as Rating__c
If Rating belongs to 0 – 3 show Red
If Rating belongs to 4 – 6 show Yellow
If Rating belongs to 7 – 9 show Green
Solution:- Create a Formula Field with Return Type as Text
Paste the Below Formula into the Formula Builder
that’s how you can achieve the above scenario.