|
| 1 | +@use "sass:map"; |
| 2 | +@import "../../themes/ionic.functions.color"; |
| 3 | + |
| 4 | +$primary: #4d8dff; |
| 5 | +$secondary: #46b1ff; |
| 6 | +$tertiary: #8482fb; |
| 7 | +$success: #2dd55b; |
| 8 | +$warning: #ffce31; |
| 9 | +$danger: #f24c58; |
| 10 | +$light: #222428; |
| 11 | +$medium: #989aa2; |
| 12 | +$dark: #f4f5f8; |
| 13 | + |
| 14 | +$colors: ( |
| 15 | + primary: ( |
| 16 | + base: $primary, |
| 17 | + contrast: #000, |
| 18 | + shade: get-color-shade($primary), |
| 19 | + tint: get-color-tint($primary) |
| 20 | + ), |
| 21 | + secondary: ( |
| 22 | + base: $secondary, |
| 23 | + contrast: #000, |
| 24 | + shade: get-color-shade($secondary), |
| 25 | + tint: get-color-tint($secondary) |
| 26 | + ), |
| 27 | + tertiary: ( |
| 28 | + base: $tertiary, |
| 29 | + contrast: #000, |
| 30 | + shade: get-color-shade($tertiary), |
| 31 | + tint: get-color-tint($tertiary) |
| 32 | + ), |
| 33 | + success: ( |
| 34 | + base: $success, |
| 35 | + contrast: #000, |
| 36 | + shade: get-color-shade($success), |
| 37 | + tint: get-color-tint($success) |
| 38 | + ), |
| 39 | + warning: ( |
| 40 | + base: $warning, |
| 41 | + contrast: #000, |
| 42 | + shade: get-color-shade($warning), |
| 43 | + tint: get-color-tint($warning) |
| 44 | + ), |
| 45 | + danger: ( |
| 46 | + base: $danger, |
| 47 | + contrast: #000, |
| 48 | + shade: get-color-shade($danger), |
| 49 | + tint: get-color-tint($danger) |
| 50 | + ), |
| 51 | + light: ( |
| 52 | + base: $light, |
| 53 | + contrast: #fff, |
| 54 | + shade: get-color-shade($light), |
| 55 | + tint: get-color-tint($light) |
| 56 | + ), |
| 57 | + medium: ( |
| 58 | + base: $medium, |
| 59 | + contrast: #000, |
| 60 | + shade: get-color-shade($medium), |
| 61 | + tint: get-color-tint($medium) |
| 62 | + ), |
| 63 | + dark: ( |
| 64 | + base: $dark, |
| 65 | + contrast: #000, |
| 66 | + shade: get-color-shade($dark), |
| 67 | + tint: get-color-tint($dark) |
| 68 | + ) |
| 69 | +); |
| 70 | + |
1 | 71 | @mixin dark-base-palette() {
|
2 | 72 | & {
|
3 |
| - --ion-color-primary: #4d8dff; |
4 |
| - --ion-color-primary-rgb: 77, 141, 255; |
5 |
| - --ion-color-primary-contrast: #000000; |
6 |
| - --ion-color-primary-contrast-rgb: 0, 0, 0; |
7 |
| - --ion-color-primary-shade: #447ce0; |
8 |
| - --ion-color-primary-tint: #5f98ff; |
9 |
| - --ion-color-secondary: #62bdff; |
10 |
| - --ion-color-secondary-rgb: 98, 189, 255; |
11 |
| - --ion-color-secondary-contrast: #000000; |
12 |
| - --ion-color-secondary-contrast-rgb: 0, 0, 0; |
13 |
| - --ion-color-secondary-shade: #56a6e0; |
14 |
| - --ion-color-secondary-tint: #72c4ff; |
15 |
| - --ion-color-tertiary: #8482fb; |
16 |
| - --ion-color-tertiary-rgb: 132, 130, 251; |
17 |
| - --ion-color-tertiary-contrast: #000000; |
18 |
| - --ion-color-tertiary-contrast-rgb: 0, 0, 0; |
19 |
| - --ion-color-tertiary-shade: #7472dd; |
20 |
| - --ion-color-tertiary-tint: #908ffb; |
21 |
| - --ion-color-success: #2dd55b; |
22 |
| - --ion-color-success-rgb: 45, 213, 91; |
23 |
| - --ion-color-success-contrast: #000000; |
24 |
| - --ion-color-success-contrast-rgb: 0, 0, 0; |
25 |
| - --ion-color-success-shade: #28bb50; |
26 |
| - --ion-color-success-tint: #42d96b; |
27 |
| - --ion-color-warning: #ffce31; |
28 |
| - --ion-color-warning-rgb: 255, 206, 49; |
29 |
| - --ion-color-warning-contrast: #000000; |
30 |
| - --ion-color-warning-contrast-rgb: 0, 0, 0; |
31 |
| - --ion-color-warning-shade: #e0b52b; |
32 |
| - --ion-color-warning-tint: #ffd346; |
33 |
| - --ion-color-danger: #f56570; |
34 |
| - --ion-color-danger-rgb: 245, 101, 112; |
35 |
| - --ion-color-danger-contrast: #000000; |
36 |
| - --ion-color-danger-contrast-rgb: 0, 0, 0; |
37 |
| - --ion-color-danger-shade: #d85963; |
38 |
| - --ion-color-danger-tint: #f6747e; |
39 |
| - --ion-color-dark: #f4f5f8; |
40 |
| - --ion-color-dark-rgb: 244, 245, 248; |
41 |
| - --ion-color-dark-contrast: #000000; |
42 |
| - --ion-color-dark-contrast-rgb: 0, 0, 0; |
43 |
| - --ion-color-dark-shade: #d7d8da; |
44 |
| - --ion-color-dark-tint: #f5f6f9; |
45 |
| - --ion-color-medium: #989aa2; |
46 |
| - --ion-color-medium-rgb: 152, 154, 162; |
47 |
| - --ion-color-medium-contrast: #000000; |
48 |
| - --ion-color-medium-contrast-rgb: 0, 0, 0; |
49 |
| - --ion-color-medium-shade: #86888f; |
50 |
| - --ion-color-medium-tint: #a2a4ab; |
51 |
| - --ion-color-light: #222428; |
52 |
| - --ion-color-light-rgb: 34, 36, 40; |
53 |
| - --ion-color-light-contrast: #ffffff; |
54 |
| - --ion-color-light-contrast-rgb: 255, 255, 255; |
55 |
| - --ion-color-light-shade: #1e2023; |
56 |
| - --ion-color-light-tint: #383a3e; |
| 73 | + @each $color-name, $value in $colors { |
| 74 | + --ion-color-#{$color-name}: #{map.get($value, base)}; |
| 75 | + --ion-color-#{$color-name}-rgb: #{color-to-rgb-list(map.get($value, base))}; |
| 76 | + --ion-color-#{$color-name}-contrast: #{map.get($value, contrast)}; |
| 77 | + --ion-color-#{$color-name}-contrast-rgb: #{color-to-rgb-list(map.get($value, contrast))}; |
| 78 | + --ion-color-#{$color-name}-shade: #{map.get($value, shade)}; |
| 79 | + --ion-color-#{$color-name}-tint: #{map.get($value, tint)}; |
| 80 | + } |
57 | 81 | }
|
58 | 82 | }
|
59 | 83 |
|
|
0 commit comments