A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 _colors.scss

View raw Download
text/plain • 2.76 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
// based color palette:
21
// https://material.google.com/style/color.html#color-color-palette
22
// based border and highlight values:
23
// https://material.google.com/style/icons.html#icons-product-icons
24
25
// Foreground colors
26
$light_contrast_color: scale-alpha(#000000, 0.8);
27
$dark_contrast_color: #FFFFFF;
28
29
$fg_color: if($variant == 'light', $light_contrast_color, $dark_contrast_color);
30
$secondary_fg_color: scale-alpha($fg_color, $enabled_opacity);
31
$tertiary_fg_color: scale-alpha($fg_color, $hint_opacity);
32
33
$inversed_fg_color: $dark_contrast_color;
34
$secondary_inversed_fg_color: scale-alpha($inversed_fg_color, $enabled_opacity);
35
$tertiary_inversed_fg_color: scale-alpha($inversed_fg_color, $hint_opacity);
36
37
$disabled_fg_color: scale-alpha($fg_color, $disabled_opacity);
38
$disabled_secondary_fg_color: scale-alpha($secondary_fg_color, $disabled_opacity);
39
$disabled_tertiary_fg_color: scale-alpha($tertiary_fg_color, $disabled_opacity);
40
41
$disabled_inversed_fg_color: scale-alpha($inversed_fg_color, $disabled_opacity);
42
$disabled_secondary_inversed_fg_color: scale-alpha($secondary_inversed_fg_color, $disabled_opacity);
43
$disabled_tertiary_inversed_fg_color: scale-alpha($tertiary_inversed_fg_color, $disabled_opacity);
44
45
// Background colors
46
$bg_color: if($variant == 'light', #F5F5F5, #455A64);
47
$base_color: if($variant == 'light', #FFFFFF, #546E7A);
48
$alt_base_color: mix($base_color, $bg_color, 50%);
49
$lighter_bg_color: if($variant =='light', #FAFAFA, #607D8B);
50
$darker_bg_color: if($variant =='light', #EEEEEE, #263238);
51
$headerbar_color: if($variant =='light', #455A64, #37474F);
52
$secondary_titlebar_color: #37474F;
53
$topbar_color: #263238;
54
55
$primary_color: #42A5F5;
56
$alt_primary_color: #40C4FF;
57
$accent_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
65
$placeholder_text_color: mix($fg_color, $base_color, percentage($hint_opacity));
66
67
$link_color: $primary_color;
68
$link_visited_color: #E040FB;
69
70
$warning_color: #FF6D00;
71
$error_color: #DD2C00;
72
$success_color: #00C853;
73
74
$suggested_color: $accent_color;
75
$destructive_color: #FF5252;
76
77
$info_bg_color: #66BB6A;
78
$question_bg_color: #42A5F5;
79
$warning_bg_color: #FFA726;
80
$error_bg_color: #EF5350;
81
82