Derives native-widget skin styling from a captured design asset (a flat PNG exported by a design tool such as the Figma plugin).
More...
Derives native-widget skin styling from a captured design asset (a flat PNG exported by a design tool such as the Figma plugin).
Rationale: the figma-plugin export ships a single flat PNG per recognized widget — a fader baked at its captured value, a meter baked at its captured level. Skinning the native widget with that image verbatim would FREEZE the control (the thumb / fill couldn't move). Instead we sample the captured pixels to recover the underlying style (track / fill / thumb colors for a fader; the gradient stops for a meter) and hand those to the widget, which redraws them procedurally — value-driven, so the thumb still moves with set_value() and the fill still tracks set_level().
This is a GENERALIZABLE importer rule: it reads the design data (the actual exported pixels) and derives style. It hardcodes no per-instance colors, pixel offsets, or widget names. Minimal RGBA8 image view consumed by the derivation. Row-major, 4 bytes/pixel. Borrowed — the caller owns the storage.