Fix but deprecate an implicit transparent color #0

This commit is contained in:
Rangi
2026-09-10 19:32:00 +02:00
committed by Eldred Habert
parent 3112239174
commit 25240e9fc0
9 changed files with 42 additions and 10 deletions
+1
View File
@@ -52,6 +52,7 @@ struct Rgba {
bool isTransparent() const { return alpha < transparency_threshold; }
static constexpr uint8_t opacity_threshold = 0xF0;
bool isOpaque() const { return alpha >= opacity_threshold; }
bool isAmbiguous() const { return isTransparent() == isOpaque(); }
// Computes the equivalent CGB color, respects the color curve depending on options
uint16_t cgbColor() const;