diff --git a/thonnycontrib/kyanite_theme_syntax/__init__.py b/thonnycontrib/kyanite_theme_syntax/__init__.py index deb2254..c3a384a 100755 --- a/thonnycontrib/kyanite_theme_syntax/__init__.py +++ b/thonnycontrib/kyanite_theme_syntax/__init__.py @@ -1,63 +1,77 @@ '''kyanite syntax theme - theme inspired by processing 4.0b3 default theme, kyanite -''' + theme inspired by processing 4.0b3 default theme, kyanite''' from thonny import get_workbench, workbench +def load_plugin() -> None: + """Registers the 'Kyanite Syntax' theme with Thonny's workbench. -def kyanite_syntax() -> workbench.SyntaxThemeSettings: - '''based on default_light (see thonny > plugins > base_syntax_themes)''' - default_fg = '#111155' - default_bg = '#FFFFF2' - light_fg = '#94A4AF' - string_fg = '#7D4793' - open_string_bg = '#E2E7E1' - gutter_foreground = '#A4B4BF' - gutter_background = '#E2E7E1' - - return { - 'TEXT': { - 'foreground': default_fg, - 'insertbackground': default_fg, - 'background': default_bg, - }, - 'GUTTER': { - 'foreground': gutter_foreground, - 'background': gutter_background - }, - 'breakpoint': {'foreground': 'crimson'}, - 'current_line': {'background': '#D9FAFF'}, - 'definition': {'foreground': '#006699', 'font': 'BoldEditorFont'}, - 'string': {'foreground': string_fg}, - 'string3': { - 'foreground': string_fg, - 'background': None, 'font': 'EditorFont' - }, - 'open_string': {'foreground': string_fg, 'background': open_string_bg}, - 'open_string3': { - 'foreground': string_fg, - 'background': open_string_bg, - 'font': 'EditorFont', - }, - 'tab': {'background': '#F5ECD7'}, - 'keyword': {'foreground': '#33997E', 'font': 'EditorFont'}, - 'builtin': {'foreground': '#006699'}, - 'number': {'foreground': '#B04600'}, - 'comment': {'foreground': light_fg}, - 'welcome': {'foreground': light_fg}, - 'magic': {'foreground': light_fg}, - 'prompt': {'foreground': string_fg, 'font': 'BoldEditorFont'}, - 'stdin': {'foreground': 'Blue'}, - 'stdout': {'foreground': 'Black'}, - 'stderr': {'foreground': '#CC0000'}, # same as ANSI red - 'value': {'foreground': 'DarkBlue'}, - 'hyperlink': {'foreground': '#3A66DD', 'underline': True} - } - + This theme is inspired by the default Processing 4.0b3 theme and builds upon + Thonny's 'Default Light' syntax theme. It customizes foreground & background + colors for various syntax elements to create a soft, readable aesthetic.""" -def load_plugin() -> None: get_workbench().add_syntax_theme( - 'Kyanite Syntax', - 'Default Light', - kyanite_syntax - ) + 'Kyanite Syntax', 'Default Light', KYANITE_SYNTAX) + + +__all__ = 'load_plugin', + +DEFAULT_BG = '#FFFFF2' # Ivory +DEFAULT_FG = '#111155' # Dark Indigo +LIGHT_FG = '#94A4AF' # Light Slate Gray +STRING_FG = '#7D4793' # Deep Orchid +OPEN_STR_BG = '#E2E7E1' # Light Gray Green +GUTTER_BG = '#E2E7E1' # Light Gray Green +GUTTER_FG = '#A4B4BF' # Pale Steel Blue + +PALE_CYAN = '#D9FAFF' +M_TEAL_BLUE = '#006699' +LIGHT_BEIGE = '#F5ECD7' +SEA_GREEN = '#33997E' +BURNT_ORANGE = '#B04600' +CRIMSON_RED = '#CC0000' +ROYAL_BLUE = '#3A66DD' + +KYANITE_SYNTAX: workbench.SyntaxThemeSettings = { + 'TEXT': { + 'foreground': DEFAULT_FG, + 'insertbackground': DEFAULT_FG, + 'background': DEFAULT_BG + }, + + 'GUTTER': { 'foreground': GUTTER_FG, 'background': GUTTER_BG }, + + 'breakpoint': { 'foreground': 'crimson' }, + 'current_line': { 'background': PALE_CYAN }, + 'definition': { 'foreground': M_TEAL_BLUE, 'font': 'BoldEditorFont' }, + 'string': { 'foreground': STRING_FG }, + + 'string3': { + 'foreground': STRING_FG, + 'background': False, + 'font': 'EditorFont' + }, + + 'open_string': { 'foreground': STRING_FG, 'background': OPEN_STR_BG }, + + 'open_string3': { + 'foreground': STRING_FG, + 'background': OPEN_STR_BG, + 'font': 'EditorFont' + }, + + 'tab': { 'background': LIGHT_BEIGE }, + 'keyword': { 'foreground': SEA_GREEN, 'font': 'EditorFont' }, + 'builtin': { 'foreground': M_TEAL_BLUE }, + 'number': { 'foreground': BURNT_ORANGE }, + 'comment': { 'foreground': LIGHT_FG }, + 'welcome': { 'foreground': LIGHT_FG }, + 'magic': { 'foreground': LIGHT_FG }, + 'prompt': { 'foreground': STRING_FG, 'font': 'BoldEditorFont' }, + 'stdin': { 'foreground': 'Blue' }, + 'stdout': { 'foreground': 'Black' }, + 'stderr': { 'foreground': CRIMSON_RED }, # same as ANSI red + 'value': { 'foreground': 'DarkBlue' }, + 'hyperlink': { 'foreground': ROYAL_BLUE, 'underline': True } +} +'''Based on default_light (see thonny > plugins > base_syntax_themes)''' diff --git a/thonnycontrib/kyanite_theme_ui/__init__.py b/thonnycontrib/kyanite_theme_ui/__init__.py index e71ebd4..be18eb8 100755 --- a/thonnycontrib/kyanite_theme_ui/__init__.py +++ b/thonnycontrib/kyanite_theme_ui/__init__.py @@ -1,24 +1,34 @@ '''kyanite ui theme - theme inspired by processing 4.0b3 default theme, kyanite -''' + theme inspired by processing 4.0b3 default theme, kyanite''' from thonny import get_workbench from thonny.plugins.clean_ui_themes import clean - def load_plugin() -> None: - get_workbench().add_ui_theme( - 'Kyanite UI', - 'Clean Sepia', - clean( - frame_background='#6BA0C7', - text_background='#FFFFF2', - normal_detail='#C4E9FF', - high_detail='#B4D9EF', - low_detail='#A4C9DF', - normal_foreground='#002233', - high_foreground='#002233', - low_foreground='#000066', - custom_menubar=0, - ), - ) + """Registers the 'Kyanite UI' theme with Thonny's workbench. + + This theme is inspired by Processing 4.0b3's default aesthetic and builds on + Thonny's 'Clean Sepia' theme, using soft blues and ivory tones for a clean, + modern look.""" + + get_workbench().add_ui_theme('Kyanite UI', 'Clean Sepia', clean( + frame_background=STEEL_BLUE, + text_background=IVORY, + normal_detail=LIGHT_SKY_BLUE, + high_detail=POWDER_BLUE, + low_detail=LIGHT_BLUE, + normal_foreground=MIDNIGHT_BLUE, + high_foreground=MIDNIGHT_BLUE, + low_foreground=NAVY, + custom_menubar=0)) + + +__all__ = 'load_plugin', + +STEEL_BLUE = '#6BA0C7' +IVORY = '#FFFFF2' +LIGHT_SKY_BLUE = '#C4E9FF' +POWDER_BLUE = '#B4D9EF' +LIGHT_BLUE = '#A4C9DF' +MIDNIGHT_BLUE = '#002233' +NAVY = '#000066'