Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
49 changes: 21 additions & 28 deletions common/accent-colors.scss.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,24 @@
$color: null;
@if $accent_color == 'default' {
$color: #E95420;
} @else if $accent_color == 'bark' {
$color: #787859;
} @else if $accent_color == 'sage' {
$color: #657B69;
} @else if $accent_color == 'olive' {
$color: #4B8501;
} @else if $accent_color == 'viridian' {
$color: #03875B;
} @else if $accent_color == 'prussiangreen' {
$color: #308280;
} @else if $accent_color == 'blue' {
$color: #0073E5;
} @else if $accent_color == 'purple' {
$color: #7764D8;
} @else if $accent_color == 'magenta' {
$color: #B34CB3;
} @else if $accent_color == 'red' {
$color: #DA3450;
}

@else if $accent_color == 'blue' {
$color: #3584e4; // ADW_ACCENT_COLOR_BLUE
} @else if $accent_color == 'teal' {
$color: #2190a4; // ADW_ACCENT_COLOR_TEAL
} @else if $accent_color == 'green' {
$color: #3a944a; // ADW_ACCENT_COLOR_GREEN
} @else if $accent_color == 'yellow' {
$color: #C88800;
} @else if $accent_color == 'wartybrown' {
$color: #B39169;
$color: #c88800; // ADW_ACCENT_COLOR_YELLOW
} @else if $accent_color == 'red' {
$color: #e62d42; // ADW_ACCENT_COLOR_RED
} @else if $accent_color == 'pink' {
$color: #d56199; // ADW_ACCENT_COLOR_PINK
} @else if $accent_color == 'purple' {
$color: #9141ac; // ADW_ACCENT_COLOR_PURPLE
} @else if $accent_color == 'slate' {
$color: #6f8396; // ADW_ACCENT_COLOR_SLATE
} @else {
@error('No known accent color defined!');
}
Expand All @@ -38,9 +34,10 @@ $jet: #181818;
$yaru_bg_color: if($yaru_is_dark_variant, #FAFAFA, lighten($jet, 8%));
$yaru_accent_bg_color: get_accent_color('@yaru_accent_color@', $yaru_is_dark_variant);

$contrast_target: if($yaru_is_dark_variant, 4.8, 4.51);
$yaru_accent_color: optimize-contrast($yaru_bg_color,
$yaru_accent_bg_color, $target: $contrast_target);
// Use Libadwaita approach with HSL approximation (GTK3 doesn't support oklab)
// accent_bg_color: Raw hex for backgrounds (with white foreground)
// accent_color: Lightness-adjusted for standalone use (links, icons)
$yaru_accent_color: standalone-accent($yaru_accent_bg_color, $yaru_is_dark_variant);

@debug("Accent color is " + $yaru_accent_bg_color);
@debug("Contrast optimized accent is " + $yaru_accent_color);
Expand All @@ -49,8 +46,4 @@ $accent_bg_color: $yaru_accent_bg_color;
$accent_fg_color: white;
$accent_color: $yaru_accent_color;

$yaru_accent_bg_color: optimize-contrast($accent_fg_color,
$yaru_accent_bg_color, $target: $contrast_target);
$accent_bg_color: $yaru_accent_bg_color;

@import '@yaru_theme_entry_point@'
19 changes: 18 additions & 1 deletion common/sass-utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,21 @@
round(green($fg) * $alpha + green($bg) * (1 - $alpha)),
round(blue($fg) * $alpha + blue($bg) * (1 - $alpha))
);
}
}

// Standalone accent color function (Libadwaita-style)
// Adjusts color lightness for use on light or dark backgrounds
// Approximates Oklab lightness thresholds using HSL
@function standalone-accent($color, $dark: false) {
$L: lightness($color);

@if $dark {
// Dark mode: ensure minimum lightness of 85% (Oklab 0.85 ≈ HSL 85%)
$L: max($L, 85%);
} @else {
// Light mode: ensure maximum lightness of 50% (Oklab 0.5 ≈ HSL 50%)
$L: min($L, 50%);
}

@return hsl(hue($color), saturation($color), $L);
}
2 changes: 2 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Build-Depends-Indep: libglib2.0-dev,
meson (>= 0.60),
libxml2-utils,
sassc,
inkscape,
optipng,
Standards-Version: 4.6.2
Rules-Requires-Root: no
Homepage: https://community.ubuntu.com/c/desktop/theme-refresh
Expand Down
6 changes: 6 additions & 0 deletions gnome-shell/src/gnome-shell-sass/_color-overrides.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//
// Color Overrides
//
// Override specific colors after all default colors are loaded

$success_bg_color: #0e8420;
87 changes: 0 additions & 87 deletions gnome-shell/src/gnome-shell-sass/_colors.scss

This file was deleted.

1 change: 1 addition & 0 deletions gnome-shell/src/gnome-shell-sass/_colors.scss
Loading