Fix runtime color alpha composition

This commit is contained in:
gem
2026-06-09 11:26:51 +08:00
parent 45ab9d7861
commit 8d2c97269a
4 changed files with 62 additions and 9 deletions

View File

@@ -34,6 +34,16 @@ Supported node concepts include:
Lua may compose higher-level widgets, but those widgets must normalize into supported runtime nodes.
### Color and alpha
`RuntimeNode.color` supports `#RRGGBB` and `#AARRGGBB`. When the alpha channel is present in the color, it is multiplied with `RuntimeNode.alpha` and any runtime animation alpha.
```text
Final opacity = color alpha × node alpha × runtime animation alpha
```
`#RRGGBB` colors behave as fully opaque colors. `#00000000` is fully transparent.
## RuntimeCommand
Runtime commands request generic side effects owned by Dart/Flame.