_colors.scss
ASCII text
1
// When color definition differs for dark and light variant,
2
// it gets @if ed depending on $variant
3
4
$higher_opacity: 0.9;
5
$middle_opacity: 0.6;
6
$lower_opacity: 0.3;
7
8
$enabled_opacity: 0.75;
9
$hint_opacity: 0.6;
10
$disabled_opacity: 0.4;
11
12
@function gtkalpha($c, $a) {
13
@return unquote("alpha(#{$c}, #{$a})");
14
}
15
16
@function scale-alpha($c, $a) {
17
@return scale-color($c, $alpha: percentage(-1 + $a));
18
}
19
20
// Foreground colors
21
$fg_color: if($variant == 'light', scale-alpha(#000000, 0.8), #FFFFFF);
22
$secondary_fg_color: scale-alpha($fg_color, $enabled_opacity);
23
$tertiary_fg_color: scale-alpha($fg_color, $hint_opacity);
24
25
$selected_fg_color: #FFFFFF;
26
$secondary_selected_fg_color: scale-alpha($selected_fg_color, $enabled_opacity);
27
$tertiary_selected_fg_color: scale-alpha($selected_fg_color, $hint_opacity);
28
29
$insensitive_fg_color: scale-alpha($fg_color, $disabled_opacity);
30
$insensitive_secondary_fg_color: scale-alpha($secondary_fg_color, $disabled_opacity);
31
$insensitive_tertiary_fg_color: scale-alpha($tertiary_fg_color, $disabled_opacity);
32
33
$insensitive_selected_fg_color: scale-alpha($selected_fg_color, $disabled_opacity);
34
$insensitive_secondary_selected_fg_color: scale-alpha($secondary_selected_fg_color, $disabled_opacity);
35
$insensitive_tertiary_selected_fg_color: scale-alpha($tertiary_selected_fg_color, $disabled_opacity);
36
37
// Background colors
38
$bg_color: if($variant == 'light', #ECEFF1, #37474F);
39
$base_color: if($variant == 'light', #FFFFFF, #455A64);
40
$secondary_base_color: mix($base_color, $bg_color, 50%);
41
$light_color: if($variant =='light', #FAFAFA, #546E7A);
42
$dark_color: if($variant =='light', mix(#ECEFF1, #CFD8DC, 50%), mix(#37474F, #263238, 50%));
43
44
$selected_bg_color: #00BCD4;
45
$secondary_selected_bg_color: #00E5FF;
46
$accent_bg_color: #FF4081;
47
48
// Misc colors
49
$track_color: gtkalpha(currentColor, $lower_opacity);
50
$borders_color: if($variant == 'light', scale-alpha(#000000, 0.1), scale-alpha(#000000, 0.2));
51
$highlight_color: if($variant == 'light', scale-alpha(#FFFFFF, 0.4), scale-alpha(#FFFFFF, 0.1));
52
$secondary_highlight_color: scale-alpha(#FFFFFF, 0.2);
53
54
$link_color: $selected_bg_color;
55
$link_visited_color: #E040FB;
56
57
$warning_color: #FF6D00;
58
$error_color: #DD2C00;
59
$success_color: #00C853;
60
61
$suggested_color: $accent_bg_color;
62
$destructive_color: #FF5252;
63
64
$info_bg_color: #66BB6A;
65
$question_bg_color: #42A5F5;
66
$warning_bg_color: #FFA726;
67
$error_bg_color: #EF5350;
68
69