Auto-compute contrast text color for accent backgrounds
Add --primary-contrast CSS variable that auto-switches between white and dark text based on accent color luminance (WCAG relative luminance). Replace all hardcoded #fff/white on primary-color backgrounds with var(--primary-contrast) so light accent colors like yellow remain readable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,7 @@ h2 {
|
||||
|
||||
.tab-btn.active .tab-badge {
|
||||
background: var(--primary-color);
|
||||
color: #fff;
|
||||
color: var(--primary-contrast);
|
||||
}
|
||||
|
||||
.tab-panel {
|
||||
@@ -410,11 +410,12 @@ h2 {
|
||||
|
||||
.cp-result.cp-active {
|
||||
background: var(--primary-color);
|
||||
color: #fff;
|
||||
color: var(--primary-contrast);
|
||||
}
|
||||
|
||||
.cp-result.cp-active .cp-detail {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
color: var(--primary-contrast);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.cp-icon {
|
||||
|
||||
Reference in New Issue
Block a user