Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $contrast as third parameter of contrast-color() function. #3

Closed
imkremen opened this issue Mar 26, 2018 · 1 comment
Closed

Add $contrast as third parameter of contrast-color() function. #3

imkremen opened this issue Mar 26, 2018 · 1 comment

Comments

@imkremen
Copy link

Add $contrast as third parameter of contrast-color() function.
If both colors meet the contrast requirements, $color1 will be used.

Example:

  $color: #6170c2;
  background-color: $color;
  color: contrast-color($color, white, black, 4.5); 
  // contrast($color, white) => 4.56;
  // contrast($color, black) => 4.6

Result CSS:

  background-color: #6170c2;
  color: white; 
@xi
Copy link
Owner

xi commented Apr 8, 2018

See #4 (comment)

@xi xi closed this as completed Apr 8, 2018
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

No branches or pull requests

2 participants