Go to file
lm 416e78ad4b Update CS2 data source
Point the pattern fetcher to the ByMykel raw GitHub URL now that the old endpoint returns 404.
2025-10-18 15:08:24 +02:00
app Update CS2 data source 2025-10-18 15:08:24 +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 Tweak CS2 fetch defaults 2025-10-18 14:53:55 +02:00
config.toml Add exclusion persistence option 2025-10-17 17:29:21 +02:00
main.py Refactor app layout and load defaults from config 2025-10-15 18:16:18 +02:00
pyproject.toml Add CS2 pattern fetcher subtool 2025-10-18 14:40:33 +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 or freehand polygons that persist while browsing
  • Theme toggle (light/dark) with rounded toolbar buttons and accent-aware highlights
  • Folder support with wrap-around previous/next navigation
  • Quick overlay export (PNG) with configurable defaults and language settings via config.toml
  • Integrated CS2 pattern fetcher to download weapon skin artwork for reference

Requirements

  • Python 3.11+ (3.10 works with tomli)
  • uv for dependency management
  • Tkinter (install separately on some Linux distros)
  • Internet access if you plan to use the CS2 pattern fetcher subtool

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 activate with source .venv/bin/activate instead.

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. Toggle freehand mode () or stick with rectangles and mark areas to exclude (right mouse drag).
  5. Move through folder images with ⬅️ / ➡️; exclusions stay put unless you opt into automatic resets.
  6. Fetch CS2 pattern images () whenever you need additional references.
  7. Save an overlay (💾) when ready.

Project Layout

app/
  app.py          # main app assembly
  gui/            # UI, theme, picker mixins
  logic/          # image ops, defaults, config helpers
  tools/          # auxiliary tools (e.g., CS2 pattern fetcher)
  lang/           # localisation TOML files
config.toml       # optional defaults
main.py           # entry point

Localisation

  • English and German translations ship in app/lang. Set the desired language via the top-level language key in config.toml.

Development

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