const enabled = process.env.NO_COLOR !== '1';
function wrap(code, value) {
    if (!enabled) {
        return value;
    }
    return `\u001b[${code}m${value}\u001b[0m`;
}
export const colors = {
    green: (value) => wrap(32, value),
    yellow: (value) => wrap(33, value),
    red: (value) => wrap(31, value),
    cyan: (value) => wrap(36, value),
    gray: (value) => wrap(90, value),
    bold: (value) => wrap(1, value)
};
export function colorRisk(tier, value) {
    if (tier === 'low') {
        return colors.green(value);
    }
    if (tier === 'medium') {
        return colors.yellow(value);
    }
    return colors.red(value);
}
