Skip to content

Conversation

@Skodder
Copy link

@Skodder Skodder commented Oct 10, 2024

No description provided.

Math.round((red * 299 + green * 587 + blue * 114) / 1000);

export const getContrastType = (contrastValue) => (contrastValue > 125 ? 'black' : 'white');
export const getContrastType = (contrastValue: number): string => (contrastValue > 125 ? 'black' : 'white');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предлагаю сузить до typeContrast = 'black' | 'white'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants