Go to file
lm 91fad62808 feat: add translation files and i18n loader
Create TOML-based localisation resources under app/lang and introduce a Translator/I18nMixin that reads them. Update config handling to recognise available languages, switch UI strings to translation lookups, and bundle language files with the package.
2025-10-17 16:43:25 +02:00
app feat: add translation files and i18n loader 2025-10-17 16:43:25 +02:00
images Initial project structure 2025-10-15 18:03:07 +02:00
.gitignore Ignore uv artifacts 2025-10-17 13:51:13 +02:00
README.md Update README.md 2025-10-17 15:45:10 +02:00
config.toml feat: add translation files and i18n loader 2025-10-17 16:43:25 +02:00
main.py Refactor app layout and load defaults from config 2025-10-15 18:16:18 +02:00
pyproject.toml feat: add translation files and i18n loader 2025-10-17 16:43:25 +02:00

README.md

ICRA
Interactive Color Range Analyzer is a Tkinter-based desktop tool for highlighting customised colour ranges in images.
Load a single photo or an entire folder, fine-tune hue/saturation/value sliders, and export overlays complete with quick statistics.

Features

  • Two synced previews (original + overlay)
  • Hue/Sat/Value sliders with presets and image colour picker
  • Exclusion rectangles to ignore regions
  • Theme toggle (light/dark) with rounded toolbar buttons
  • Folder support with previous/next navigation
  • Quick overlay export (PNG) and optional defaults via config.toml

Requirements

  • Python 3.11+ (3.10 works with tomli)
  • uv for dependency management
  • Tkinter (install separately on some Linux distros)

Setup with uv (Windows PowerShell)

git clone https://git.lukasmahler.de/lm/ICRA.git
cd ICRA
uv venv
source .venv/Scripts/activate
uv pip install .
uv run icra

The launcher copies Tcl/Tk resources into the virtualenv on first run, so no manual environment tweaks are needed. On macOS/Linux replace the activate step with source .venv/bin/activate.

Workflow

  1. Load an image (📂) or a folder (📁).
  2. Pick a colour (🎨 dialog, 🖱️ image click, or preset swatch).
  3. Finetune sliders; watch the overlay update on the right.
  4. Move through folder images with ⬅️ / ➡️.
  5. Draw exclusions with right drag; reset or save when ready.

Config Defaults

Optional config.toml:

[defaults]
hue_min = 250.0
hue_max = 310.0
sat_min = 15.0
val_min = 15.0
val_max = 100.0
alpha = 120

Project Layout

app/
  app.py          # main app assembly
  gui/            # UI, theme, picker mixins
  logic/          # image ops, defaults, reset
config.toml       # optional defaults
main.py           # entry point

Development

  • Quick check: uv run python -m compileall app main.py
  • Contributions welcome; include screenshots for UI tweaks.