Skip to content

Commit

Permalink
fix: calendar coloring issue (#4352)
Browse files Browse the repository at this point in the history
* fix: calendar coloring issue

* fix: calendar coloring issue

* fix: calendar coloring issue

* fix: calendar coloring issue

* fix: calendar coloring issue

* chore: adjust calendar color for dark theme
  • Loading branch information
shungiku authored Feb 5, 2025
1 parent 03267d6 commit c2210b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions web/src/components/ActivityCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const getCellAdditionalStyles = (count: number, maxCount: number) => {
if (count === 0) {
return "";
}
if (count >= 3) {
const ratio = count / maxCount;
if (ratio > 0.7) {
return "bg-primary-darker/80 text-gray-100 dark:opacity-80";
} else if (ratio > 0.4) {
return "bg-primary/80 text-gray-100 dark:opacity-80";
}
const ratio = count / maxCount;
if (ratio > 0.75) {
return "bg-primary-darker/90 text-gray-100 dark:bg-primary-lighter/80";
} else if (ratio > 0.5) {
return "bg-primary-darker/70 text-gray-100 dark:bg-primary-lighter/60";
} else if (ratio > 0.25) {
return "bg-primary/70 text-gray-100 dark:bg-primary-lighter/40";
} else {
return "bg-primary/70 text-gray-100 dark:opacity-70";
return "bg-primary/50 text-gray-100 dark:bg-primary-lighter/20";
}
};

Expand Down
1 change: 1 addition & 0 deletions web/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
DEFAULT: "#0d9488", // Teal 600
dark: "#0f766e", // Teal 700
darker: "#0d5a56", // Teal 800
lighter: "#14b8a6", // Teal 500
},
success: {
DEFAULT: "#16a34a", // Green 600
Expand Down

0 comments on commit c2210b6

Please sign in to comment.