APIs to specify the background color of badge

When I use the coverage badge the code coverage percentage is shown in grey background color by default and I didn’t find any option to specify the color in the badge url

I have 100% code coverage and the badge showing the 100% value with grey color does not look good to me.

shields.io and other such badge provides has such support in their apis.

The option to specify the color as query parameter in badge apis would be a great feature.

Hello,

Actually before thinking about an API to change the color, the first thing we should do is to align the color of the badge with the color of the related rating measure.

In the case of the “Coverage %”, the ranges would be the ones of the Projects page:

image

The ranges match the 5 colors we currently have for the ratings (A, B, C, D, E) and you will get a badge with a green background.

An internal ticket already exist for that (SC-2107). I linked your request to it so we can come back to you once it’s available.

Alex

1 Like

Thanks. Showing the coverage badge with green background for >= 80% coverage will also suffice.

Currently its being shown like this
image

Waiting for the fix. Thanks!