Skip to main content

A small, themeable Tkinter widget kit — a dark/light photo-tool look with one live theme.

Project description

TintKit

A small, themeable tkinter UI kit — a dark/light photo-tool look as reusable controls. One theme drives every colour, widgets reuse each other, and the look switches live with no restart.

Python License UI

TintKit — dark theme TintKit — light theme

Run the gallery

python gallery.py

Every component in one scrollable window, with a live Dark / Light + accent switcher at the top — the whole window repaints instantly. (The handlers are demos; the controls themselves are genuinely interactive.)

Install

pip install tintkit            # the kit — zero required dependencies
pip install "tintkit[icons]"   # + Pillow, to recolour the Lucide icons

Pure-stdlib tkinter — no required dependencies. The [icons] extra adds Pillow to recolour the bundled Lucide icons; without it widgets still work and shapes stay anti-aliased (drawn in pure Tk) — only the glyphs are skipped. Point at your own icons with set_icon_dir("…/my_icons").

Use it

import tkinter as tk
from tintkit import Theme, setup_dpi, Button, Toggle

root = tk.Tk()
setup_dpi(root)                       # crisp icons on high-DPI screens
theme = Theme(scheme="dark", accent="#8fae9b")

Button(root, theme, "Save", icon="save", command=lambda: print("saved")).pack()
Toggle(root, theme, value=True, command=lambda on: print(on)).pack()
root.mainloop()

Every widget takes the same first two args — the parent and the shared theme — and returns an object you .pack() / .grid() like any tk widget. One theme is the single source of truth; change it and the whole tree repaints:

theme.set(scheme="light")             # dark <-> light
theme.set(accent="#c08457")           # any accent; shades derived for you
theme.toggle_scheme()

Read any token anywhere with theme["accent"], theme["panel"], theme["r_control"]

What's inside

module what it holds
tintkit/theme.py dark/light schemes, accent + danger/warn derivation, repaint observer
tintkit/icons.py the Lucide icon loader (recoloured per theme)
tintkit/primitives.py rounded_rect, the CanvasControl base, themed Surface / Label
tintkit/controls.py Button, Slider, Toggle, Radio, Checkbox, SegmentedTabs, Dropdown, Badge, Tag, ProgressBar, Tooltip, TextField
tintkit/containers.py Card, dialog, callout, section header, drag sashes, scrollbar
tintkit/composites.py toolbar, tool rail, folder nav + tree, selection views, settings window
gallery.py the style guide window + live switcher

Design rules: no widget hard-codes a colour (each reads theme[...] and repaints on change); one radius scale — r_control / r_pill / r_card, no magic numbers; widgets reuse widgets; all glyphs are Lucide PNGs (ISC) recoloured at load.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tintkit-0.2.1.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tintkit-0.2.1-py3-none-any.whl (74.2 kB view details)

Uploaded Python 3

File details

Details for the file tintkit-0.2.1.tar.gz.

File metadata

  • Download URL: tintkit-0.2.1.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for tintkit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 655bd424d261e7b8882ff4a971aae426eba69c39dcc99b9c55c9d52864be1743
MD5 07870c1531f65d253a520e781164819a
BLAKE2b-256 edf02c8bcb370346ad1f22342b9e2f8c900d0e83e9c2456b83e15ee0366fe673

See more details on using hashes here.

File details

Details for the file tintkit-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: tintkit-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 74.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for tintkit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1578bda7d1cc12687e1b4fa95138f7cab706848a685020614f6dcd357087ea8
MD5 b53cc8c91aba64bfef31a2b392cdb85d
BLAKE2b-256 c044ae1b3a91a198c6e90c0caf6a7b5e11393cf9a05bf929336d33702034d2f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page