Skip to content

Commit

Permalink
extension scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
timhettler committed Sep 26, 2013
0 parents commit 2f99d0f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions extensions/compass-color-contrast/stylesheets/_color-contrast.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$yiq-contrasted-dark-default: #000;
$yiq-contrasted-light-default: #fff;
$yiq-color-contrast-threshold: 1000;

@function yiq-color-contrast($color, $dark: $yiq-contrasted-dark-default, $light: $yiq-contrasted-light-default, $threshold: $yiq-color-contrast-threshold) {
$red: red($color);
$green: green($color);
$blue: blue($color);

$yiq = (($red*299)+($green*587)+($blue*114))/$threshold;

@return if($yiq >= 128, $yiq-contrasted-dark-default, $yiq-contrasted-light-default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
discover :all

0 comments on commit 2f99d0f

Please sign in to comment.