diff --git a/settings/appearance/color.go b/settings/appearance/color.go index 8a7cc6d..5b12d8b 100644 --- a/settings/appearance/color.go +++ b/settings/appearance/color.go @@ -27,7 +27,7 @@ func GetColorScheme() (ColorScheme, error) { } result := value.(uint32) - if result > 2 { + if result > 2 || result > 255 { result = 0 // Unknown values should be treated as 0 (no preference). } diff --git a/settings/appearance/contrast.go b/settings/appearance/contrast.go index 0cf900a..e8e0652 100644 --- a/settings/appearance/contrast.go +++ b/settings/appearance/contrast.go @@ -18,7 +18,7 @@ func GetContrast() (Contrast, error) { } result := value.(uint32) - if result > 1 { + if result > 1 || result > 255 { result = 0 // Unknown values should be treated as 0 (no preference). }