feat: add high contrast mode for accessibility

- Add HighContrast variant to Theme enum in Rust backend
- Add high-contrast CSS theme with pure black/white for max contrast
- Use bright saturated colors for syntax highlighting
- Add High Contrast button to theme selector with accessibility tooltip
- Follows WCAG guidelines for contrast ratios

Closes #20
This commit is contained in:
2026-01-25 13:44:52 -08:00
committed by Naomi Carrigan
parent 457722dc3a
commit b1a45ed00e
4 changed files with 50 additions and 3 deletions
+7
View File
@@ -123,6 +123,8 @@ pub enum Theme {
#[default]
Dark,
Light,
#[serde(rename = "high-contrast")]
HighContrast,
}
#[cfg(test)]
@@ -185,8 +187,13 @@ mod tests {
fn test_theme_serialization() {
let dark = Theme::Dark;
let light = Theme::Light;
let high_contrast = Theme::HighContrast;
assert_eq!(serde_json::to_string(&dark).unwrap(), "\"dark\"");
assert_eq!(serde_json::to_string(&light).unwrap(), "\"light\"");
assert_eq!(
serde_json::to_string(&high_contrast).unwrap(),
"\"high-contrast\""
);
}
}