fix(edit): curate the CalDAV colour picker (#22) #70

Merged
makiolaj merged 1 commits from fix/caldav-color-picker-v2 into release/v2.14.1 2026-07-12 09:40:19 +00:00
Owner

Revives the CalDAV colour-picker curation (Codeberg #22, reported by @ptab) that was written on fix/caldav-color-picker but never merged — it stalled during the floret-kit migration, which then extracted pastelize and invalidated the branch's approach. This is a fresh re-land adapted to today's tree.

The bug

CalDAV sync adapters (DAVx5) publish all ~147 CSS3 named colours into CalendarContract.Colors, so the event-colour picker showed a full screen of alphabetically-scrambled, duplicated swatches. It's still live in shipped builds — eventColorPalette() returned the raw list and the picker painted it straight.

The fix

Curation now runs in the space the picker actually paints (softened through pastelize: pinned lightness, capped saturation):

  1. Colours that paint identically collapse to one (folds aliases, dark/light shades of a hue, and the neutrals together).
  2. Oversized palettes drop washed-out neutral-origin tints, then thin by CIE76 delta-E in painted Lab.
  3. Survivors sort continuously by painted hue, wheel cut at its single widest gap.

The CSS3 dump lands at ~33 distinct, rainbow-ordered swatches. Small hand-picked palettes (Google's) pass through untouched. Every surviving swatch keeps its provider colour key, so picks still round-trip through sync.

floret-kit adaptation

Since the original branch, pastelize moved into floret-kit. The painted-space transform now lives self-contained in domain/pastelArgb() as a documented mirror of floret's pastelize shaping (kept in sync by hand), rather than the two sharing one function.

Notes

  • Targets release/v2.14.1 (bugs-only patch train). Rebased to a single commit so no Weblate translation churn rides along.
  • ./gradlew test lint green locally.
  • UI change -> on-device review owed before this train is bumped/merged to main. Please eyeball the picker on a real DAVx5 account.

Closes #22.

Generated with Claude Code

Revives the CalDAV colour-picker curation (Codeberg #22, reported by @ptab) that was written on `fix/caldav-color-picker` but **never merged** — it stalled during the floret-kit migration, which then extracted `pastelize` and invalidated the branch's approach. This is a fresh re-land adapted to today's tree. ### The bug CalDAV sync adapters (DAVx5) publish all ~147 CSS3 named colours into `CalendarContract.Colors`, so the event-colour picker showed a full screen of alphabetically-scrambled, duplicated swatches. It's still live in shipped builds — `eventColorPalette()` returned the raw list and the picker painted it straight. ### The fix Curation now runs in the space the picker actually **paints** (softened through `pastelize`: pinned lightness, capped saturation): 1. Colours that paint identically collapse to one (folds aliases, dark/light shades of a hue, and the neutrals together). 2. Oversized palettes drop washed-out neutral-origin tints, then thin by CIE76 delta-E in painted Lab. 3. Survivors sort continuously by painted hue, wheel cut at its single widest gap. The CSS3 dump lands at ~33 distinct, rainbow-ordered swatches. Small hand-picked palettes (Google's) pass through untouched. Every surviving swatch keeps its provider colour key, so picks still round-trip through sync. ### floret-kit adaptation Since the original branch, `pastelize` moved into floret-kit. The painted-space transform now lives self-contained in `domain/pastelArgb()` as a documented mirror of floret's `pastelize` shaping (kept in sync by hand), rather than the two sharing one function. ### Notes - Targets `release/v2.14.1` (bugs-only patch train). Rebased to a single commit so no Weblate translation churn rides along. - `./gradlew test lint` green locally. - **UI change -> on-device review owed before this train is bumped/merged to main.** Please eyeball the picker on a real DAVx5 account. Closes #22. Generated with Claude Code
makiolaj added 1 commit 2026-07-12 09:24:24 +00:00
fix(edit): curate the CalDAV colour picker (#22)
All checks were successful
CI / ci (pull_request) Successful in 5m18s
b6bcd195b0
CalDAV sync adapters (DAVx5) publish all ~147 CSS3 named colours into
CalendarContract.Colors, so the event-colour picker showed a full screen
of alphabetically-scrambled, partly duplicated swatches.

Curation now runs in the space the picker actually paints — every swatch
is softened through pastelize, which pins lightness and caps saturation,
so the raw palette's lightness axis is invisible on screen. Judging
distinctness there: colours that paint identically collapse to one
(folding aliases, dark/light shades of a hue, and the neutrals together),
oversized palettes drop washed-out neutral-origin tints and thin by CIE76
ΔE in painted Lab, and survivors sort continuously by painted hue with the
wheel cut at its single widest gap. The CSS3 dump lands at ~33 distinct,
rainbow-ordered swatches; small hand-picked palettes (Google's) pass
through untouched. Every surviving swatch keeps its provider colour key so
picks still round-trip through sync.

This revives work stranded on fix/caldav-color-picker (never merged) and
adapts it to the floret-kit extraction of pastelize: the curation's
painted-space transform now lives self-contained in domain/pastelArgb as a
mirror of floret's pastelize shaping, rather than the two sharing one
function.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
makiolaj merged commit bda002684c into release/v2.14.1 2026-07-12 09:40:19 +00:00
makiolaj deleted branch fix/caldav-color-picker-v2 2026-07-12 09:40:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: makiolaj/calendula#70