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.79 kiB
ASCII text
        
            
1
// When color definition differs for dark and light variant,
2
// it gets @if ed depending on $variant
3
4
@function gtkalpha($c, $a) {
5
@return unquote("alpha(#{$c}, #{$a})");
6
}
7
8
@function scale-alpha($c, $a) {
9
@return scale-color($c, $alpha: percentage(-1 + $a));
10
}
11
12
@import 'color-palette';
13
14
// based border and highlight values:
15
// https://material.google.com/style/icons.html#icons-product-icons
16
17
// Foreground colors
18
$dark_fg_color: scale-alpha($black, 0.8);
19
$light_fg_color: $white;
20
21
$fg_color: if($variant == 'light', $dark_fg_color, $light_fg_color);
22
$secondary_fg_color: scale-alpha($fg_color, $secondary_opacity);
23
$tertiary_fg_color: scale-alpha($fg_color, $tertiary_opacity);
24
25
$inverse_fg_color: $light_fg_color;
26
$secondary_inverse_fg_color: scale-alpha($inverse_fg_color, $secondary_opacity);
27
$tertiary_inverse_fg_color: scale-alpha($inverse_fg_color, $tertiary_opacity);
28
29
$titlebar_fg_color: if($titlebar == 'dark', $inverse_fg_color, $fg_color);
30
$secondary_titlebar_fg_color: if($titlebar == 'dark', $secondary_inverse_fg_color, $secondary_fg_color);
31
$tertiary_titlebar_fg_color: if($titlebar == 'dark', $tertiary_inverse_fg_color, $tertiary_fg_color);
32
33
$disabled_fg_color: scale-alpha($fg_color, $disabled_opacity);
34
$disabled_secondary_fg_color: scale-alpha($secondary_fg_color, $disabled_opacity);
35
$disabled_tertiary_fg_color: scale-alpha($tertiary_fg_color, $disabled_opacity);
36
37
$disabled_inverse_fg_color: scale-alpha($inverse_fg_color, $disabled_opacity);
38
$disabled_secondary_inverse_fg_color: scale-alpha($secondary_inverse_fg_color, $disabled_opacity);
39
$disabled_tertiary_inverse_fg_color: scale-alpha($tertiary_inverse_fg_color, $disabled_opacity);
40
41
$disabled_titlebar_fg_color: if($titlebar == 'dark', $disabled_inverse_fg_color, $disabled_fg_color);
42
$disabled_secondary_titlebar_fg_color: if($titlebar == 'dark', $disabled_secondary_inverse_fg_color, $disabled_secondary_fg_color);
43
$disabled_tertiary_titlebar_fg_color: if($titlebar == 'dark', $disabled_tertiary_inverse_fg_color, $disabled_tertiary_fg_color);
44
45
// Background colors
46
$bg_color: if($variant == 'light', $grey_100, $blue_grey_700);
47
$base_color: if($variant == 'light', $white, $blue_grey_600);
48
$alt_base_color: if($variant == 'light', $grey_50, mix($base_color, $bg_color, 50%));
49
$lighter_bg_color: if($variant == 'light', $grey_50, $blue_grey_500);
50
$darker_bg_color: if($variant == 'light', $grey_200, $blue_grey_900);
51
52
$titlebar_bg_color: if($variant == 'light', if($titlebar == 'dark', $blue_grey_700, $grey_300), $blue_grey_800);
53
$alt_titlebar_bg_color: if($titlebar == 'dark', $blue_grey_800, $grey_400);
54
$panel_bg_color: if($titlebar == 'dark', $blue_grey_900, $grey_400);
55
56
$fill_color: gtkalpha(currentColor, $lower_opacity);
57
$semi_fill_color: gtkalpha(currentColor, $lower_opacity / 2);
58
$row_fill_color: gtkalpha(currentColor, 0.05);
59
60
// Misc colors
61
$primary_color: $blue_400;
62
$alt_primary_color: $light_blue_A200;
63
$accent_color: $pink_A200;
64
65
$link_color: $primary_color;
66
$visited_link_color: $purple_A200;
67
68
$warning_color: $orange_A700;
69
$error_color: $deep_orange_A700;
70
$success_color: $green_A700;
71
72
$suggested_color: $accent_color;
73
$destructive_color: $red_A200;
74
75
$info_bg_color: $green_400;
76
$question_bg_color: $blue_400;
77
$warning_bg_color: $orange_400;
78
$error_bg_color: $red_400;
79
80
$border_color: if($variant == 'light', scale-alpha($black, 0.1), scale-alpha($black, 0.2));
81
$highlight_color: if($variant == 'light', scale-alpha($white, 0.4), scale-alpha($white, 0.1));
82
$alt_highlight_color: scale-alpha($white, 0.2);
83
$unity_highlight_color: if($titlebar == 'dark', scale-alpha($white, 0.1), scale-alpha($white, 0.2));
84
$titlebar_highlight_color: if($titlebar == 'dark', $alt_highlight_color, $highlight_color);
85
$titlebar_indicator_color: if($titlebar == 'dark', currentColor, $primary_color);
86
87
$placeholder_text_color: mix($fg_color, $base_color, percentage($tertiary_opacity));
88