Skip to main content

ctk_themio

ctk_themio

Visual theme editor for CustomTkinter. Design a theme, see it immediately on every widget type, save it as JSON.

What CustomTkinter theming is

CustomTkinter is a modern Python GUI library that wraps Tkinter with a cleaner look and dark mode support. Its appearance is controlled by JSON theme files: a set of color and geometry values for each widget type, specified separately for light and dark mode.

A theme file looks like this:

{
  "CTkButton": {
    "fg_color": ["#3B8ED0", "#1F6AA5"],
    "hover_color": ["#36719F", "#144870"],
    "border_color": ["#3E454A", "#949A9F"],
    "border_width": 0,
    "corner_radius": 6
  }
}

The first value in each pair is the light-mode color; the second is the dark-mode color. There are 18+ widget types, each with multiple color and geometry properties. Editing this by hand is tedious and hard to visualise.

What ctk_themio does

It gives you a panel with color pickers and sliders on the left and a live preview panel showing all 18+ widgets on the right. Change a color; the preview updates immediately. Export the JSON when you are happy.

Additional features:

  • Color harmonics: generate complementary, analogous, or triadic palettes from a base color
  • Theme merging: combine properties from two theme files
  • Import/export: load any existing CustomTkinter JSON theme for editing
  • Undo/redo: full command stack for non-destructive editing
  • Geometry editing: adjust corner radii and border widths with sliders

Install

Requires Python 3.13+.

pip install ctk_themio
# or
uv pip install ctk_themio

macOS / Linux

curl -LsSf uvx.sh/ctk_themio/install.sh | sh && ctk-themio

Run

# Open the full theme editor
ctk-themio

# Open in preview-only mode with a specific appearance and theme
ctk-themio -a Dark -t my_theme.json

# Run the widget showcase demo
ctk-themio-demo

Theme file format

Themes are JSON files stored in ~/.local/share/ctk_themio/themes/ (Linux), ~/Library/Application Support/ctk_themio/themes/ (macOS), or the equivalent Windows path. The built-in themes live inside the package and are copied to the user directory on first run.

Color values are [light, dark] pairs (hex strings). Geometry values are numbers. Both are stored in the same file and can be edited independently.

Architecture

The application follows an MVC pattern:

  • Controller (controller/ctk_theme_builder.py): parses CLI args, launches the correct window
  • Model (model/ctk_theme_builder.py): theme loading/saving, undo/redo command stack, property change tracking
  • View (view/): control panel (~2500 lines), live preview panel (~1300 lines), and a set of dialogs for harmonics, geometry, preferences, and merging
  • Utils (utils/cbtk_kit.py): color manipulation — hex/RGB conversion, lightness adjustment, contrast checking

User preferences are stored in a SQLite database (auto-initialized on first run) via model/preferences.py. This tracks last-used theme, appearance mode, window geometry, and saved color palettes.

Development

# Install with the dev group
uv sync --group dev

# Lint, type-check, test
uvx ruff check src/ tests/
uvx ruff format --check src/ tests/
uvx mypy                       # headless modules
uv run --group dev python -m pytest tests/

The test suite is headless — it exercises the colour maths, the SQLite preference store, path handling, and v4→v5 theme migration without opening a window, so it runs in CI on Linux (under xvfb) and macOS. The GUI layer under view/ is dynamically typed against CustomTkinter and sits outside the type-checked set.

Based on

ctk_themio is a repackaged and updated version of CTk Theme Builder by Clive Bostock, published under MIT license.

License

MIT

Metadata

Release files for ctk-themio 3.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ctk-themio 3.1.2
File Size Uploaded Provenance Actions
ctk_themio-3.1.2.tar.gz 8.4 MB With provenance Details for ctk_themio-3.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ctk-themio 3.1.2
File Interpreter ABI Platform Actions
ctk_themio-3.1.2-py3-none-any.whl Python 3 none any Details for ctk_themio-3.1.2-py3-none-any.whl

Total release size: 16.9 MB

Release files / ctk_themio-3.1.2.tar.gz

Download URL ctk_themio-3.1.2.tar.gz
Size 8.4 MB
Tags Source
SHA-256 checksum
How to use checksums
8b34cf970365cc8c0dad74428df0b212f92c3c2ffd1d1dc293c7cafea6aaba96
BLAKE2b-256 checksum
How to use checksums
9d5fe16cdff2acc8294d4bb6718d92723861065b8b5802c7bdcad0740d06c0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / ctk_themio-3.1.2-py3-none-any.whl

Download URL ctk_themio-3.1.2-py3-none-any.whl
Size 8.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cab413da0493ac4cc12fc83ddd3f988267455969a80557c7689f040f08b56256
BLAKE2b-256 checksum
How to use checksums
873f4fc9a47270756cd14ac2f9583ff08fe4f39275cbfcdad1f5f64abd87d70b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for ctk-themio 3.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ctk_themio-3.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.1.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page