{"id":34109060,"url":"https://github.com/definite-d/reskinner","last_synced_at":"2026-03-17T20:22:08.129Z","repository":{"id":57750913,"uuid":"526211511","full_name":"definite-d/reskinner","owner":"definite-d","description":"Instantaneous theme changing for PySimpleGUI and FreeSimpleGUI windows.","archived":false,"fork":false,"pushed_at":"2026-02-07T14:47:04.000Z","size":21804,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-07T22:21:31.367Z","etag":null,"topics":["color","freesimplegui","gui","pysimplegui","python","realtime","reskin","theme","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/definite-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-18T12:55:04.000Z","updated_at":"2026-02-07T14:47:08.000Z","dependencies_parsed_at":"2022-08-26T08:31:34.090Z","dependency_job_id":"4400dbbd-fb12-4b23-a30d-1064587d5a01","html_url":"https://github.com/definite-d/reskinner","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"cad9dc9414ff9514be401f99dcb59de8f2cb6654"},"previous_names":["definite-d/psg_reskinner"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/definite-d/reskinner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/definite-d%2Freskinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/definite-d%2Freskinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/definite-d%2Freskinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/definite-d%2Freskinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/definite-d","download_url":"https://codeload.github.com/definite-d/reskinner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/definite-d%2Freskinner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29627664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T18:02:07.722Z","status":"ssl_error","status_checked_at":"2026-02-19T18:01:46.144Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color","freesimplegui","gui","pysimplegui","python","realtime","reskin","theme","tkinter"],"created_at":"2025-12-14T18:25:50.727Z","updated_at":"2026-02-19T19:00:54.692Z","avatar_url":"https://github.com/definite-d.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reskinner: Dynamic Theme Switching for PySimpleGUI and FreeSimpleGUI\n\n[![PyPI Version](https://img.shields.io/pypi/v/reskinner?style=flat)](https://pypi.org/project/reskinner/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/reskinner?style=flat\u0026logo=python)](https://pypi.org/project/reskinner/)\n[![License](https://img.shields.io/pypi/l/reskinner?style=flat)](https://opensource.org/licenses/MIT)\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Downloads](https://static.pepy.tech/personalized-badge/reskinner?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=yellowgreen\u0026left_text=downloads)](https://pepy.tech/project/reskinner)\n[![GitHub issues](https://img.shields.io/github/issues/definite-d/reskinner)](https://github.com/definite-d/psg_reskinner/issues)\n![GitHub forks](https://img.shields.io/github/forks/definite-d/reskinner?logo=github\u0026style=flat)\n[![GitHub stars](https://img.shields.io/github/stars/definite-d/reskinner?logo=github\u0026style=flat)](https://github.com/definite-d/psg_reskinner/stargazers)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/definite-d/psg_reskinner/blob/main/res/demo.gif\" alt=\"Reskinner Demo\"\u003e\n\u003c/p\u003e\n\n### V4 Release\n\nWith the release of Version 4.0.0, the project is now officially known as \"Reskinner\". This is a re-write, focusing on\nimprovements to the structure and API of the project.\n\n#### Biggest changes\n\n- Full support for [FreeSimpleGUI](https://github.com/spyoungtech/FreeSimpleGUI) is here. Thanks to [@deajan](https://github.com/deajan) for the contribution and bringing it to my notice.\n- The entire project has been rewritten from scratch for better maintainability, extensibility, and performance.\n- The `animated_reskin` function is no more... because the `reskin` function itself has animation parameters baked in now.\n- The API for `reskin` has been improved to require only 2 parameters; the window, and the desired theme.\n- ~~The project's minimum supported Python version is now 3.8.~~ Python 3.7 support is back from 4.0.1\n- Mentions of `HSV` interpolation in the code have been corrected; it's `HSL`.\n\nReskinner is a powerful library for PySimpleGUI and FreeSimpleGUI, enabling dynamic theme switching at runtime without window recreation. It provides a seamless way to update your application's look and feel on the fly.\n\n## Features\n\n- Dynamic theme switching without window recreation\n- Supports both PySimpleGUI and FreeSimpleGUI\n- Easy integration with existing applications\n- Precise control over theme transitions with animations and 3 supported interpolation modes.\n- Lightweight and dependency-minimal\n\n## Installation\n\n### Using pip (PyPI)\n\n```bash\n# For PySimpleGUI\npip install \"reskinner[psg]\"\n\n# For FreeSimpleGUI\npip install \"reskinner[fsg]\"\n```\n\n### Using uv\n\n```bash\n# Install uv if not already installed\npip install uv\n\n# For PySimpleGUI\nuv add reskinner[psg]\n\n# For FreeSimpleGUI\nuv add reskinner[fsg]\n```\n\n## Quick Start\n\n```python\nfrom random import choice\nimport PySimpleGUI as sg  # or import FreeSimpleGUI as sg\nfrom reskinner import reskin\n\n# Create a simple window\nlayout = [\n    [sg.Text(\"Hello, Reskinner!\")],\n    [sg.Button(\"Change Theme\"), sg.Button(\"Exit\")]\n]\n\nwindow = sg.Window(\"Reskinner Demo\", layout)\n\nthemes = sg.theme_list()\ncurrent_theme = sg.theme()\n\ndef change_theme():\n    new_theme = choice([t for t in themes if t != current_theme])\n    reskin(window, new_theme)\n    return new_theme\n\nwhile True:\n    event, values = window.read()\n\n    if event in (sg.WIN_CLOSED, 'Exit'):\n        break\n\n    if event == \"Change Theme\":\n        current_theme = change_theme()\n\nwindow.close()\n```\n\n## Documentation\n\n### Core Function\n\n#### `reskin`\n\n```python\nfrom reskinner import reskin\nimport PySimpleGUI as sg\n\n# Apply a new theme instantly\nreskin(window=my_window, new_theme=\"DarkBlue3\", theme_function=sg.theme)\n```\n\n## Advanced Usage\n\n### Custom Interpolation\n\nReskinner supports three different interpolation modes for theme transitions; `hsl`, `hue`, and `rgb` (default):\n\n```python\nfrom reskinner import reskin\nimport PySimpleGUI as sg\n\n# Smooth, animated color transition using HSL interpolation\nreskin(\n    window=window,\n    new_theme=\"DarkAmber\",\n    theme_function=sg.theme,\n    duration_in_milliseconds=800,\n    interpolation_mode=\"hsl\",\n)\n```\n\n### Element-Specific Filtering\n\nCustomize whether specific elements are styled during reskinning:\n\n```python\nfrom reskinner import reskin\nimport PySimpleGUI as sg\n\n# Skip elements you don't want to restyle\nreskin(\n    window=window,\n    new_theme=\"LightGreen\",\n    theme_function=sg.theme,\n    element_filter=lambda e: e.key != \"skip_me\"\n)\n```\n\n### Using a named easing function\n\nThis uses one of Reskinner’s built-in easing functions (based on [https://easing.net](https://easing.net)) for a smooth, natural animation.\n\n```python\nfrom reskinner import reskin\nimport PySimpleGUI as sg\n\n# Apply a theme with animation and built-in easing\nreskin(\n    window=window,\n    new_theme=\"DarkBlue\",\n    duration=1000,  # milliseconds\n    interpolation_mode=\"rgb\",\n    easing_function=\"ease_in_out_sine\",\n)\n```\n\n### Using a custom easing function\n\nAny callable accepting a `float` between `0` and `1`, and returning a `float` in the same range, is valid as a custom easing function. In this example, we use the [golden ratio](https://en.wikipedia.org/wiki/Golden_ratio) as our easing function\n\n```python\nfrom math import pow\nfrom reskinner import reskin\nimport PySimpleGUI as sg\n\n\ndef golden_ease_out(t: float) -\u003e float:\n    phi = (1 + 5 ** 0.5) / 2  # ≈ 1.618\n    return 1 - pow(1 - t, phi)\n\n# Apply a theme with golden-ratio-based easing\nreskin(\n    window=window,\n    new_theme=\"DarkGreen5\",\n    duration=1000,\n    interpolation_mode=\"rgb\",\n    easing_function=golden_ease_out,\n)\n```\n\n## Compatibility\n\n- Python 3.8+\n- PySimpleGUI 4.60.0+ or FreeSimpleGUI 5.0.0+ _(Tkinter variant **only**; Reskinner doesn't support \\*Qt, \\*Wx, or \\*Web variants)_\n- Tkinter (included with Python)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- The [PySimpleGUI](https://github.com/pysimplegui/pysimplegui) and [FreeSimpleGUI](https://github.com/spyoungtech/FreeSimpleGUI) communities\n- All contributors who have helped improve Reskinner\n\n## FAQs\n\n### How does it work?\n\nReskinner runs through each element in a window, then by relying on the `element.widget`\ninterface to access the underlying Tkinter object, it applies style changes to the window.\n\n### What's the story behind psg_reskinner?\n\nLike [Unda](https://github.com/definite-d/unda), I created Reskinner to be a part/feature of a desktop application which\nI'm developing, however, I decided to open-source it, as I imagined other developers would find such functionality\nuseful in their projects as well.\n\nDevelopment began on Monday 15th August 2022.\n\n### Why is it called Reskinner?\n\nI didn't want it to go against the built-in conventions of `theme` and `look_and_feel` that PySimpleGUI has.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefinite-d%2Freskinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefinite-d%2Freskinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefinite-d%2Freskinner/lists"}