Created
January 28, 2022 02:32
-
-
Save bryanjvolz/adc04553bab05b5a1b85da65452cec3e to your computer and use it in GitHub Desktop.
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
//Color Theme | |
$colors-theme: ( | |
lighter_grey: #f4f4f4, | |
light_grey: #f6f6f6, | |
light_grey2: #f3f3f3, | |
mid_grey: #5c6061, | |
main_blue: #2e79bb, | |
main_blue2: #518ebe, | |
orange: #f99f42, | |
red: #de1b54, | |
dark_purple: #26235d, | |
mid_purple: #615f89, | |
green: #6cc049, | |
white: #fff, | |
black: #000 | |
); | |
@function get-color($color){ | |
$color: map-get($colors-theme, $color); | |
@return $color; | |
} | |
@function set-color-from-background($color) { | |
@if (lightness($color) > 50) { | |
@return get-color(black); // Lighter background, return dark color | |
} @else { | |
@return get-color(white); // Darker background, return light color | |
} | |
} | |
@function rem($pixels, $context: $font-size) { | |
@return #{$pixels/$context}rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment