Skip to content

Commit

Permalink
Fix the rgbgfx color curve
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Nov 1, 2023
1 parent 32bc68d commit 5141be3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gfx/rgba.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ uint16_t Rgba::cgbColor() const {
r = reverse_curve[r];
g = reverse_curve[g];
b = reverse_curve[b];
} else {
r >>= 3;
g >>= 3;
b >>= 3;
}
return (r >> 3) | (g >> 3) << 5 | (b >> 3) << 10;
return r | g << 5 | b << 10;
}

uint8_t Rgba::grayIndex() const {
Expand Down

0 comments on commit 5141be3

Please sign in to comment.