Skip to content

getCoverageBadgeColor

Picks the badge color of a coverage figure, on the shields.io scale.

Import:

import { getCoverageBadgeColor } from '@mnaoumov/obsidian-dev-toolkit/test-runners/coverage-badge';

Signature:

function getCoverageBadgeColor(percent: number): string

Parameters:

Parameter Type Description
percent number The coverage figure, in percents.

Returns: string — The color, as a CSS hex color.