_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// Reference URL: 21// https://material.google.com/style/color.html#color-color-palette 22// https://material.google.com/style/icons.html#icons-product-icons 23 24// Foreground colors 25$light_contrast_color: scale-alpha(#000000, 0.8); 26$dark_contrast_color: #FFFFFF; 27 28$fg_color: if($variant == 'light', $light_contrast_color, $dark_contrast_color); 29$secondary_fg_color: scale-alpha($fg_color, $enabled_opacity); 30$tertiary_fg_color: scale-alpha($fg_color, $hint_opacity); 31 32$inversed_fg_color: $dark_contrast_color; 33$secondary_inversed_fg_color: scale-alpha($inversed_fg_color, $enabled_opacity); 34$tertiary_inversed_fg_color: scale-alpha($inversed_fg_color, $hint_opacity); 35 36$disabled_fg_color: scale-alpha($fg_color, $disabled_opacity); 37$disabled_secondary_fg_color: scale-alpha($secondary_fg_color, $disabled_opacity); 38$disabled_tertiary_fg_color: scale-alpha($tertiary_fg_color, $disabled_opacity); 39 40$disabled_inversed_fg_color: scale-alpha($inversed_fg_color, $disabled_opacity); 41$disabled_secondary_inversed_fg_color: scale-alpha($secondary_inversed_fg_color, $disabled_opacity); 42$disabled_tertiary_inversed_fg_color: scale-alpha($tertiary_inversed_fg_color, $disabled_opacity); 43 44// Background colors 45$bg_color: if($variant == 'light', #F5F5F5, #455A64); 46$base_color: if($variant == 'light', #FFFFFF, #546E7A); 47$alt_base_color: mix($base_color, $bg_color, 50%); 48$lighter_bg_color: if($variant =='light', #FAFAFA, #607D8B); 49$darker_bg_color: if($variant =='light', #EEEEEE, #263238); 50$headerbar_color: if($variant =='light', #455A64, #37474F); 51 52$primary_color: #42A5F5; 53$alt_primary_color: #40C4FF; 54$accent_color: #FF4081; 55 56// Misc colors 57$track_color: gtkalpha(currentColor, $lower_opacity); 58$borders_color: if($variant == 'light', scale-alpha(#000000, 0.1), scale-alpha(#000000, 0.2)); 59$highlight_color: if($variant == 'light', scale-alpha(#FFFFFF, 0.4), scale-alpha(#FFFFFF, 0.1)); 60$secondary_highlight_color: scale-alpha(#FFFFFF, 0.2); 61 62$placeholder_text_color: mix($fg_color, $base_color, percentage($hint_opacity)); 63 64$link_color: $primary_color; 65$link_visited_color: #E040FB; 66 67$warning_color: #FF6D00; 68$error_color: #DD2C00; 69$success_color: #00C853; 70 71$suggested_color: $accent_color; 72$destructive_color: #FF5252; 73 74$info_bg_color: #66BB6A; 75$question_bg_color: #42A5F5; 76$warning_bg_color: #FFA726; 77$error_bg_color: #EF5350; 78 79