UI adjust + optimize

- adjust about page appearance
- change mode menu shape to round
- enlarge on selected mode
- improve color recognition algorithm
- code optimize
This commit is contained in:
KOWX712
2024-12-30 02:04:35 +08:00
parent 24548025fe
commit fe64f37361
5 changed files with 36 additions and 19 deletions

View File

@@ -219,7 +219,7 @@ function applyRippleEffect() {
const rgb = color.match(/\d+/g);
if (!rgb) return false;
const [r, g, b] = rgb.map(Number);
return (r * 0.299 + g * 0.587 + b * 0.114) < 128; // Luma formula
return (r * 0.299 + g * 0.587 + b * 0.114) < 96; // Luma formula
};
ripple.style.backgroundColor = isDarkColor(bgColor) ? "rgba(255, 255, 255, 0.2)" : "";