Security level to get colors for
Color pair object with background and text colors
// Basic usage
const colors = getSecurityLevelColorPair('High');
console.log(colors.bg); // "#27ae60"
console.log(colors.text); // "#00e676"
// With dynamic level
const UserBadge = ({ level }: { level: SecurityLevel }) => {
const colors = getSecurityLevelColorPair(level);
return (
<span style={{ backgroundColor: colors.bg, color: colors.text }}>
{level}
</span>
);
};
Get security level color pair by level name.
Retrieves the background and text colors for a given security level. Returns "None" colors as fallback for invalid or undefined levels.