More accurate 8-bit <=> 5-bit RGB color conversion (#1827)
@@ -1,4 +1,4 @@
|
||||
error: Failed to fit tile colors [$1527, $15cc, $1ab4] in specified palettes
|
||||
error: Failed to fit tile colors [$1527, $15cc, $1a93] in specified palettes
|
||||
note: The following palette was specified:
|
||||
[$1ab4, $15cc]
|
||||
[$1a93, $15cc]
|
||||
Conversion aborted after 1 error
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
error: Failed to fit tile colors [$6c8a, $7f55, $7fff] in specified palettes
|
||||
error: Failed to fit tile colors [$688b, $7f55, $7fff] in specified palettes
|
||||
note: The following palettes were specified:
|
||||
[$5f77, $213d, $41a6, $40ee]
|
||||
[$3f65, $36b3, $262a, $50b0]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: Failed to fit tile colors [$6c8a, $7f55, $7fff] in specified palettes
|
||||
error: Failed to fit tile colors [$688b, $7f55, $7fff] in specified palettes
|
||||
note: The following palettes were specified:
|
||||
[$7fff, $7f55]
|
||||
[$7fff, $6c8a]
|
||||
[$7fff, $688b]
|
||||
Conversion aborted after 1 error
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
warning: Fusing colors #a9b9c9ff and #aabbccff into Game Boy color $66f5 [first seen at x: 1, y: 1]
|
||||
warning: Fusing colors #a9bacbff and #aabbccff into Game Boy color $66f5 [first seen at x: 1, y: 1]
|
||||
FATAL: Tile (0, 0) contains the background color (#aabbccff)!
|
||||
Conversion aborted after 1 error
|
||||
|
||||
|
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 174 B |
@@ -1 +1 @@
|
||||
妉U<EFBFBD><EFBFBD><EFBFBD>
|
||||
媓U<EFBFBD><EFBFBD><EFBFBD>
|
||||
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 556 B |
@@ -144,7 +144,7 @@ static void generate_palettes(uint16_t palettes[/* 60 */][4]) {
|
||||
* Expand a 5-bit color component to 8 bits with minimal bias
|
||||
*/
|
||||
static uint8_t _5to8(uint8_t five) {
|
||||
return five << 3 | five >> 2;
|
||||
return (five * 255 + 15) / 31;
|
||||
}
|
||||
|
||||
// Can't mark as `const`, as the array type is otherwise not compatible (augh)
|
||||
|
||||