From af73be4c30a4a08c770450ad5873f8bb3f79f7a8 Mon Sep 17 00:00:00 2001 From: oddron Date: Thu, 10 Oct 2024 23:07:20 -0400 Subject: [PATCH] Accept themes with American spelling of color --- pygame_gui/core/ui_appearance_theme.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygame_gui/core/ui_appearance_theme.py b/pygame_gui/core/ui_appearance_theme.py index 2e28e4cb..2fe3d84f 100644 --- a/pygame_gui/core/ui_appearance_theme.py +++ b/pygame_gui/core/ui_appearance_theme.py @@ -770,7 +770,7 @@ def _parse_single_element_data(self, element_name, element_theming): self._load_element_font_data_from_theme(file_dict, element_name) - if data_type == 'colours': + if data_type == 'colours' or data_type == 'colors': self._load_element_colour_data_from_theme(data_type, element_name, element_theming) @@ -1048,7 +1048,7 @@ def _load_colour_defaults_from_theme(self, theme_dict: Dict[str, Any]): :param theme_dict: The data dictionary from the theming file to load data from. """ for data_type in theme_dict['defaults']: - if data_type == 'colours': + if data_type == 'colours' or data_type == 'colors': colours_dict = theme_dict['defaults'][data_type] for colour_key in colours_dict: colour = self._load_colour_or_gradient_from_theme(colours_dict,