Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/assets/img/svg/gitea-colorblind-blueyellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions services/webtheme/webtheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@ func (info *ThemeMetaInfo) GetDescription() string {
if info.ColorblindType == "red-green" {
return "Red-green colorblind friendly"
}
if info.ColorblindType == "blue-yellow" {
return "Blue-yellow colorblind friendly"
}
return ""
}

func (info *ThemeMetaInfo) GetExtraIconName() string {
if info.ColorblindType == "red-green" {
return "gitea-colorblind-redgreen"
}
if info.ColorblindType == "blue-yellow" {
return "gitea-colorblind-blueyellow"
}
return ""
}

Expand Down
8 changes: 8 additions & 0 deletions web_src/css/themes/theme-gitea-auto-tritanopia.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "./theme-gitea-light-tritanopia.css" (prefers-color-scheme: light);
@import "./theme-gitea-dark-tritanopia.css" (prefers-color-scheme: dark);

gitea-theme-meta-info {
--theme-display-name: "Auto";
--theme-colorblind-type: "blue-yellow";
--theme-color-scheme: "auto";
}
15 changes: 15 additions & 0 deletions web_src/css/themes/theme-gitea-dark-tritanopia.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import "./theme-gitea-dark-protanopia-deuteranopia.css";

gitea-theme-meta-info {
--theme-display-name: "Dark";
--theme-colorblind-type: "blue-yellow";
--theme-color-scheme: "dark";
}

/* blue/yellow colorblind-friendly colors */
/* from GitHub: blue yellow blindness is based on red green blindness, and --diffBlob-deletion-* restored to the normal theme color */
:root {
--color-diff-removed-linenum-bg: #482121;
--color-diff-removed-row-bg: #301e1e;
--color-diff-removed-word-bg: #6f3333;
}
15 changes: 15 additions & 0 deletions web_src/css/themes/theme-gitea-light-tritanopia.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import "./theme-gitea-light-protanopia-deuteranopia.css";

gitea-theme-meta-info {
--theme-display-name: "Light";
--theme-colorblind-type: "blue-yellow";
--theme-color-scheme: "light";
}

/* blue/yellow colorblind-friendly colors */
/* from GitHub: blue yellow blindness is based on red green blindness, and --diffBlob-deletion-* restored to the normal theme color */
:root {
--color-diff-removed-linenum-bg: #ffcecb;
--color-diff-removed-row-bg: #ffeef0;
--color-diff-removed-word-bg: #fdb8c0;
}
13 changes: 13 additions & 0 deletions web_src/svg/gitea-colorblind-blueyellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.