Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //YIQ Implementation
- @function yiq($color) {
- $red : red($color);
- $green: green($color);
- $blue : blue($color);
- @return (($red*.299)+($green*.587)+($blue*.114));
- }
- @function color-contrast($background, $dark:#000, $light:#fff) {
- @if yiq($background) >= 128 {
- @return $dark;
- } @else {
- @return $light;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement