Skip to content

Instantly share code, notes, and snippets.

@sean-clayton
Created October 31, 2013 23:49
Show Gist options
  • Save sean-clayton/7259060 to your computer and use it in GitHub Desktop.
Save sean-clayton/7259060 to your computer and use it in GitHub Desktop.
Change color based on lightness of another color
$font-color: 0;
@if lightness($background-color) >= 50 {
$font-color: black;
}
@if lightness($background-color) <= 50 {
$font-color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment