Created
December 23, 2015 06:18
-
-
Save angelsystem/3a273b72d6a430fedaed to your computer and use it in GitHub Desktop.
Colour Management with Sass Maps # ref: http://conormcafee.co.uk/journal/colour-management-with-sass-maps.html?utm_source=designernews
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a { | |
colour: brand-colour(blue); | |
&:hover { | |
colour: brand-colour(blue, dark); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$brand-colours: ( | |
grey: ( | |
base: $grey, | |
light: lighten($grey, 10%), | |
dark: darken($grey, 10%) | |
), | |
orange: ( | |
base: $orange, | |
light: lighten($orange, 10%), | |
dark: darken($orange, 10%) | |
), | |
blue: ( | |
base: $blue, | |
light: lighten($blue, 10%), | |
dark: darken($blue, 10%) | |
), | |
green: ( | |
base: $green, | |
light: lighten($green, 10%), | |
dark: darken($green, 10%) | |
), | |
white: ( | |
base: $white | |
), | |
black: ( | |
base: $black | |
) | |
); | |
@function brand-colour($brand-colour, $tone: 'base') { | |
@return map-get(map-get($brand-colours, $brand-colour), $tone); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$grey: #C1CAD6; | |
$orange: #EF4640; | |
$blue: #4392F1; | |
$green: #00A676; | |
$white: #ffffff; | |
$black: #525252; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment