1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
$foundation-palette: ( primary: #0070b8, secondary: #f08a00, tertiary: #6f7072, quaternary: #003f6c, quinary: #fecc00, senary: #a6a8aa, success: #2dcc70, warning: #ffae00, alert: #e20d0d, ); $light-gray: #e6e6e6; $medium-gray: #cacaca; $dark-gray: #8a8a8a; $black: #000000; $white: #ffffff; $body-background: $white; $body-font-color: $black; @include add-foundation-colors; $tertiary-color: get-color(tertiary); $quaternary-color: get-color(quaternary); $quinary-color: get-color(quinary); $senary-color: get-color(senary); $primary-color-white-25: mix(white, $primary-color, 25%); $primary-color-white-50: mix(white, $primary-color, 50%); $primary-color-black-25: mix(black, $primary-color, 25%); $primary-color-black-50: mix(black, $primary-color, 50%); $secondary-color-white-25: mix(white, $secondary-color, 25%); $secondary-color-white-50: mix(white, $secondary-color, 50%); $secondary-color-black-25: mix(black, $secondary-color, 25%); $secondary-color-black-50: mix(black, $secondary-color, 50%); $tertiary-color-white-25: mix(white, $tertiary-color, 25%); $tertiary-color-white-50: mix(white, $tertiary-color, 50%); $tertiary-color-black-25: mix(black, $tertiary-color, 25%); $tertiary-color-black-50: mix(black, $tertiary-color, 50%); $quaternary-color-white-25: mix(white, $quaternary-color, 25%); $quaternary-color-white-50: mix(white, $quaternary-color, 50%); $quaternary-color-black-25: mix(black, $quaternary-color, 25%); $quaternary-color-black-50: mix(black, $quaternary-color, 50%); $quinary-color-white-25: mix(white, $quinary-color, 25%); $quinary-color-white-50: mix(white, $quinary-color, 50%); $quinary-color-black-25: mix(black, $quinary-color, 25%); $quinary-color-black-50: mix(black, $quinary-color, 50%); $senary-color-white-25: mix(white, $senary-color, 25%); $senary-color-white-50: mix(white, $senary-color, 50%); $senary-color-black-25: mix(black, $senary-color, 25%); $senary-color-black-50: mix(black, $senary-color, 50%); $gradient-palette: ( primary: ( start: $primary-color, end: $quaternary-color, ), secondary: ( start: $secondary-color, end: $quinary-color, ), tertiary: ( start: $tertiary-color, end: $senary-color, ), quaternary: ( start: #373738, end: #535355, ), quinary: ( start: #d2d3d4, end: #f5f5f5, ), senary: ( start: #e5f0f7, end: #f2f8fb, ), ); $primary-gradient-start-color: map-deep-get($gradient-palette, primary, start); $primary-gradient-end-color: map-deep-get($gradient-palette, primary, end); $secondary-gradient-start-color: map-deep-get($gradient-palette, secondary, start); $secondary-gradient-end-color: map-deep-get($gradient-palette, secondary, end); $tertiary-gradient-start-color: map-deep-get($gradient-palette, tertiary, start); $tertiary-gradient-end-color: map-deep-get($gradient-palette, tertiary, end); $quaternary-gradient-start-color: map-deep-get($gradient-palette, quaternary, start); $quaternary-gradient-end-color: map-deep-get($gradient-palette, quaternary, end); $quinary-gradient-start-color: map-deep-get($gradient-palette, quinary, start); $quinary-gradient-end-color: map-deep-get($gradient-palette, quinary, end); $senary-gradient-start-color: map-deep-get($gradient-palette, senary, start); $senary-gradient-end-color: map-deep-get($gradient-palette, senary, end); |
Étiquette : couleurs
[SASS] Fonctions et mixins pour manipuler les couleurs
- Documentation officielle (RGB Functions, HSL Functions, Opacity Functions).
- A Visual Guide to Sass & Compass Color Functions – Jackie Balzer
- Des fonctions pour éclairer ou assombrir une couleur, respectivement par le blanc ou le noir.
- Sass lighten() and darken() vs mix() using black and white – A PEN BY Josh McCarty
- Shades and Tints of a color.
Eclaircir une couleur avec la fonction Mix de SASS
1 |
mix(white, $color, $percentage); |
Assombrir une couleur avec la fonction Mix de SASS
1 |
mix(black, $color, $percentage); |