Style Learning
PIXL builds a profile of your art style and uses it to keep new tiles consistent with your existing work.
Style fingerprint
When you run pixl_learn_style, PIXL analyzes your tiles and extracts 8 properties:
Light direction
Pixel density
Shadow ratio
Palette breadth
Run length
Hue bias
Luminance
Entropy
These 8 numbers are your style fingerprint. Every new tile gets scored against it.
How scoring works
When you generate a new tile, PIXL compares its fingerprint to your session fingerprint. A score of 0.8 means "close match." A score of 0.3 means "very different style."
The threshold adapts: if your last 5 accepted tiles averaged 0.75, PIXL sets the minimum at 0.6 (80% of your average). Tiles below that get flagged before you see them.
Feedback loop
Every accept/reject decision teaches PIXL:
- Accept a tile → its style features get averaged into your preferred profile
- Reject as "too sparse" → future tiles aim for higher density
- Reject as "bad edges" → future tiles get stricter edge validation
Few-shot examples
The last 3 accepted tiles are stored as reference examples. When generating new tiles, PIXL includes these as rendered images in the prompt — the AI sees what your art actually looks like, not just a text description of style.
Using it
# Extract style from existing tiles
pixl style tileset.pax
# Output:
# Style fingerprint (from 12 tiles):
# Light: top-left (0.35)
# Density: dense (87%)
# Shadows: moderate (15%)
# Colors per tile: 3.2
# Hue bias: 240° (cool/blue)