Angled Gradient Modifier

Draw a linear gradient at an arbitrary angle across a Compose box so both endpoints land exactly on the box edge — the per-quadrant endpoint formula from the requested angle, why rotating the diagonal overshoots and why clamping to the nearest edge distorts the angle, and the degenerate cases that collapse the ramp to nothing. Use when a tilted gradient looks washed out or cut off near the corners, when the visible angle does not match the angle you asked for, or when the same gradient looks different on a wide box than on a tall one.

maxrave-dev 6edf154 8.3 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/angled-gradient-modifier commit 6edf154891

Frequently asked questions

npx skillmds@latest add maxrave-dev/angled-gradient-modifier