A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 _colors.scss

View raw Download
text/plain • 3.4 kiB
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
$topbar_fg_color: if($light == 'true', $fg_color, $selected_fg_color);
30
$secondary_topbar_fg_color: if($light == 'true', $secondary_fg_color, $secondary_selected_fg_color);
31
$tertiary_topbar_fg_color: if($light == 'true', $tertiary_fg_color, $tertiary_selected_fg_color);
32
33
$insensitive_fg_color: scale-alpha($fg_color, $disabled_opacity);
34
$insensitive_secondary_fg_color: scale-alpha($secondary_fg_color, $disabled_opacity);
35
$insensitive_tertiary_fg_color: scale-alpha($tertiary_fg_color, $disabled_opacity);
36
37
$insensitive_selected_fg_color: scale-alpha($selected_fg_color, $disabled_opacity);
38
$insensitive_secondary_selected_fg_color: scale-alpha($secondary_selected_fg_color, $disabled_opacity);
39
$insensitive_tertiary_selected_fg_color: scale-alpha($tertiary_selected_fg_color, $disabled_opacity);
40
41
$insensitive_topbar_fg_color: if($light == 'true', $insensitive_fg_color, $insensitive_selected_fg_color);
42
$insensitive_secondary_topbar_fg_color: if($light == 'true', $insensitive_secondary_fg_color, $insensitive_secondary_selected_fg_color);
43
$insensitive_tertiary_topbar_fg_color: if($light == 'true', $insensitive_tertiary_fg_color, $insensitive_tertiary_selected_fg_color);
44
45
// Background colors
46
$bg_color: if($variant == 'light', #F5F5F5, #455A64);
47
$base_color: if($variant == 'light', #FFFFFF, #546E7A);
48
$secondary_base_color: mix($base_color, $bg_color, 50%);
49
$light_color: if($variant == 'light', #FAFAFA, #607D8B);
50
$dark_color: if($variant == 'light', #EEEEEE, #263238);
51
$headerbar_color: if($variant == 'light', if($light == 'true', #E0E0E0, #455A64), #37474F);
52
$unity_titlebar_color: if($light == 'true', #BDBDBD, #37474F);
53
$topbar_color: if($light == 'true', #BDBDBD, #263238);
54
55
$selected_bg_color: #42A5F5;
56
$secondary_selected_bg_color: #40C4FF;
57
$accent_bg_color: #FF4081;
58
59
// Misc colors
60
$track_color: gtkalpha(currentColor, $lower_opacity);
61
$borders_color: if($variant == 'light', scale-alpha(#000000, 0.1), scale-alpha(#000000, 0.2));
62
$highlight_color: if($variant == 'light', scale-alpha(#FFFFFF, 0.4), scale-alpha(#FFFFFF, 0.1));
63
$secondary_highlight_color: scale-alpha(#FFFFFF, 0.2);
64
$topbar_highlight_color: if($light == 'true', $highlight_color, $secondary_highlight_color);
65
$topbar_indicator_color: if($light == 'true', $selected_bg_color, currentColor);
66
67
$placeholder_text_color: mix($fg_color, $base_color, percentage($hint_opacity));
68
69
$link_color: $selected_bg_color;
70
$link_visited_color: #E040FB;
71
72
$warning_color: #FF6D00;
73
$error_color: #DD2C00;
74
$success_color: #00C853;
75
76
$suggested_color: $accent_bg_color;
77
$destructive_color: #FF5252;
78
79
$info_bg_color: #66BB6A;
80
$question_bg_color: #42A5F5;
81
$warning_bg_color: #FFA726;
82
$error_bg_color: #EF5350;
83
84