Ok. Here is a way to get exactly what you want.
- Create a calculated column that returns type number.
- Record the background color of your view page - usually this will be white.
- For the calculated column, use:
=IF([*Group Column Name*]="*Group Heading of First Group*","<span style='color:*background color of view*'>1</span>*Group Heading of First Group*",IF([*Group Column Name*]="*Group Heading of Second Group*","<span style='color:*background color of view*'>2</span>*Group Heading of Second Group*",*","<span style='color:*background color of view*'>3</span>*Group Heading of Third Group*"))
- Group by your calculated column.
The example above contains 3 groups. The 'number' return type of a calculated column will be read as html and not escapced. When you add a span with the same background color it will not show up but it will be read for Alpha order.
Here is an example of the calculated formula:
=IF([Environment Type]="Production","<span style='color:white'>1</span>Production",IF([Environment Type]="Test","<span style='color:white'>2</span>Test","<span style='color:white'>3</span>Development"))