diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-05 18:05:05 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-05 18:05:05 +0200 |
| commit | 9c468ffb40f832ff25f23bd6027b93ae8d40c7bf (patch) | |
| tree | 80914e650315df794d6b50fd8fb45dede71e1112 /templates/typora/udt.css.in | |
| parent | f89e3b7dc5dbad2fce9a62e644c11cb963547349 (diff) | |
| download | unified-desktop-theme-9c468ffb40f832ff25f23bd6027b93ae8d40c7bf.tar.gz unified-desktop-theme-9c468ffb40f832ff25f23bd6027b93ae8d40c7bf.zip | |
feat(accent): pick the colour that stands out, not the average
colorz returned cluster means, which averaged a small vivid element into
its surroundings, so a violet motif on a frame of pale skin came out as a
muddy red. signature_color() now reads the pixels of a 256px thumbnail
itself and scores each by chroma times its distance from the image's mean
colour. The top 2% vote by hue, neighbouring bands summed, and the most
vivid pixel near the peak is snapped. A pick under chroma 25 is a tint and
takes the fallback.
Dropping colorz also fixes two bugs. Its k-means seeds are random, so one
wallpaper could snap differently between runs. And it calls sys.exit() on
some images, which `except Exception` in main() does not catch, so
udt-accent died without writing and the previous accent stayed.
Over 314 wallpapers: no errors (colorz failed on 18), 25 fall back,
about 0.06s each. The selftest gains a small-vivid-patch case and a
grey-image case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'templates/typora/udt.css.in')
0 files changed, 0 insertions, 0 deletions
