Skip to content

Seed drawn-feature fill alpha explicitly in the color - #15

Merged
TommySquared merged 1 commit into
mainfrom
fix/drawn-style-alpha
Sep 21, 2026
Merged

TommySquared merged 1 commit into
mainfrom
fix/drawn-style-alpha

Conversation

@TommySquared

Copy link
Copy Markdown
Collaborator

What

User-drawn features defaulted to a 6-digit fill_color="#7cc242" — alpha genuinely FF — while rendering translucent through the fill layer's baked-in 0.5 base fill-opacity. Client style editors that read transparency from the color's alpha byte therefore showed 100% for a polygon that looks half-transparent. Agent-added polygons already carry their translucency in the color itself (e.g. #3388ff20) and behave consistently.

This makes the drawn default follow the same convention: fill_color="#7cc24280" (50%).

Notes

  • Effective rendered fill gets lighter for newly drawn features: 0.5 color alpha × 0.5 base fill-opacity = 25%, vs 50% before.
  • The baked 0.5 base fill-opacity (['case', hover, 0.72, 0.5]) is left untouched — changing it would re-tint every geojson asset on every map, and deserves its own issue if we want "color alpha is the whole truth" semantics.
  • Existing drawn assets keep their stored 6-digit style; only new draws get the new default.

🤖 Generated with Claude Code

The EoGPT layer drawer's new alpha slider seeds from the fill color's
alpha byte. Drawn features defaulted to a 6-digit #7cc242 — genuinely
alpha FF, so the slider seeded at 100% while the polygon rendered
translucent through the fill layer's baked-in 0.5 base fill-opacity.
Agent-added polygons already carry 8-digit fills (e.g. #3388ff20),
which is why they seeded correctly.

Carry the drawn default's translucency in the color itself (0x80 =
50%), matching that convention. Note the effective rendered fill gets
lighter (0.5 color alpha x 0.5 base = 0.25 vs 0.5 before); the baked
0.5 base is a separate discussion since changing it re-tints every
geojson asset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TommySquared
TommySquared merged commit 4ad2e62 into main Sep 21, 2026
3 checks passed
@TommySquared
TommySquared deleted the fix/drawn-style-alpha branch September 21, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant