Skip to content

Instantly share code, notes, and snippets.

@lkpttn
Forked from orderedlist/labels.scss
Created July 13, 2012 20:36
Show Gist options
  • Select an option

  • Save lkpttn/3107306 to your computer and use it in GitHub Desktop.

Select an option

Save lkpttn/3107306 to your computer and use it in GitHub Desktop.
Simple Label Colors with SCSS
$red:#f36d54;
$number: 100;
@for $i from 1 through $number {
.label-#{$i} {
color:adjust_hue($red, ($i - 1) * (360 / $number));
}
}
@lkpttn

lkpttn commented Jul 13, 2012

Copy link
Copy Markdown
Author

The larger the $number, the closer it gets to a looking like a gradient. 12 steps with twelve labels is a rainbow essentially.

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