Init light dark colors

This commit is contained in:
Jeremy Thomas
2019-05-17 15:49:25 +01:00
parent 9d3c36e02c
commit 770bae827f
6 changed files with 86 additions and 31 deletions

View File

@@ -56,7 +56,17 @@
@return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722)
@function findColorInvert($color)
@if (colorLuminance($color) > 0.55)
@if (type-of($color) == 'color') and (colorLuminance($color) > 0.6)
@return rgba(#000, 0.7)
@else
@return #fff
@function findLightColor($color)
@if type-of($color) == 'color'
@return change-color($color, $lightness: 96%)
@return $background
@function findDarkColor($color)
@if type-of($color) == 'color'
@return change-color($color, $lightness: 29%)
@return $text-strong