8
8
// These are the colors apps are can override. We define the defaults here and
9
9
// define variables for them in _colors.scss
10
10
11
- // The main accent color and the matching text value
12
-
13
11
@use ' sass:color' ;
14
12
@use ' settings' as * ;
15
13
@use ' functions' as * ;
@@ -22,27 +20,39 @@ $_fg_color: #323233; // Similar to rgba(0,0,6,0.8) on the background #fafafb
22
20
$_text_color : #333334 ; // Similar to rgba(0,0,6,0.8) on the background #ffffff
23
21
$_hb_fg_color : #2f2f30 ; // Similar to rgba(0,0,6,0.8) on the background #ebebed
24
22
23
+ // The main accent color and the matching text value
25
24
@define-color accent_bg_color @blue_3;
26
25
@define-color accent_fg_color white;
27
- @define-color accent_color #{if ($variant == ' dark' , gtkmix (' @accent_bg_color' , white , 60% ), gtkmix (' @accent_bg_color' , black , 83% ))} ;
28
26
29
27
// destructive-action buttons
30
- @define-color destructive_bg_color #{if ($variant == ' dark ' , ' @red_4 ' , ' @red_3 ' )} ;
28
+ @define-color destructive_bg_color #{if ($variant == ' light ' , ' @red_3 ' , ' @red_4 ' )} ;
31
29
@define-color destructive_fg_color white;
32
- @define-color destructive_color #{if ($variant == ' dark' , gtkmix (' @destructive_bg_color' , white , 60% ), gtkmix (' @destructive_bg_color' , black , 83% ))} ;
33
30
34
31
// Levelbars, entries, labels and infobars. These don't need text colors
35
- @define-color success_bg_color #{if ($variant == ' dark ' , ' @green_5 ' , ' @green_4 ' )} ;
32
+ @define-color success_bg_color #{if ($variant == ' light ' , ' @green_4 ' , ' @green_5 ' )} ;
36
33
@define-color success_fg_color white;
37
- @define-color success_color #{if ($variant == ' dark' , gtkmix (' @success_bg_color' , white , 60% ), gtkmix (' @success_bg_color' , black , 83% ))} ;
38
34
39
- @define-color warning_bg_color #{if ($variant == ' dark ' , ' #cd9309 ' , " @yellow_5 " )} ;
35
+ @define-color warning_bg_color #{if ($variant == ' light ' , ' @yellow_5 ' , " #c01c28 " )} ;
40
36
@define-color warning_fg_color rgba(0,0,0,0.8 );
41
- @define-color warning_color #{if ($variant == ' dark' , gtkmix (' @warning_bg_color' , white , 60% ), gtkmix (' @warning_bg_color' , black , 83% ))} ;
42
37
43
- @define-color error_bg_color #{if ($variant == ' dark ' , ' @red_4 ' , ' @red_3 ' )} ;
38
+ @define-color error_bg_color #{if ($variant == ' light ' , ' @red_3 ' , ' @red_4 ' )} ;
44
39
@define-color error_fg_color white;
45
- @define-color error_color #{if ($variant == ' dark' , gtkmix (' @error_bg_color' , white , 60% ), gtkmix (' @error_bg_color' , black , 83% ))} ;
40
+
41
+ // Colors derived from their matching bg color
42
+ // Not quite the same as libadwaita but "close enough"
43
+ @if $variant == ' light' {
44
+ @define-color accent _color #{gtkmix (' @accent_bg_color' , black , 83% )} ;
45
+ @define-color destructive _color #{gtkmix (' @destructive_bg_color' , black , 83% )} ;
46
+ @define-color success _color #{gtkmix (' @success_bg_color' , black , 83% )} ;
47
+ @define-color warning _color #{gtkmix (' @warning_bg_color' , black , 83% )} ;
48
+ @define-color error _color #{gtkmix (' @error_bg_color' , black , 83% )} ;
49
+ } @else {
50
+ @define-color accent _color #{gtkmix (' @accent_bg_color' , white , 60% )} ;
51
+ @define-color destructive _color #{gtkmix (' @destructive_bg_color' , white , 60% )} ;
52
+ @define-color success _color #{gtkmix (' @success_bg_color' , white , 60% )} ;
53
+ @define-color warning _color #{gtkmix (' @warning_bg_color' , white , 60% )} ;
54
+ @define-color error _color #{igtkmix (' @error_bg_color' , white , 60% )} ;
55
+ }
46
56
47
57
// Window
48
58
@define-color window_bg_color #{if ($variant == ' light' , ' #fafafb' , ' #222226' )} ;
0 commit comments