Revert "More accurate 8-bit <=> 5-bit RGB color conversion (#1827)"

This reverts commit 223b3d1921.
This commit is contained in:
Rangi42
2025-10-24 13:32:59 -04:00
parent 8bedd710d7
commit ca383c91ca
20 changed files with 15 additions and 31 deletions

View File

@@ -50,10 +50,9 @@ uint16_t Rgba::cgbColor() const {
g = reverse_curve[g];
b = reverse_curve[b];
} else {
constexpr auto _8to5 = [](uint8_t c) -> uint8_t { return (c * 31 + 127) / 255; };
r = _8to5(r);
g = _8to5(g);
b = _8to5(b);
r >>= 3;
g >>= 3;
b >>= 3;
}
return r | g << 5 | b << 10;
}