Converts 24 bit colors to 15 bit colors
Go to file
Alex Gentilucci cc344d9e90
Always outputs rounded down and rounded up variants
2020-05-29 20:27:16 -06:00
.gitignore Updated gitignore to ignore binaries 2020-05-28 17:11:13 -06:00
README.md Always outputs rounded down and rounded up variants 2020-05-29 20:27:16 -06:00
UNLICENSE initial commit 2020-05-28 17:06:39 -06:00
main.c Always outputs rounded down and rounded up variants 2020-05-29 20:27:16 -06:00

README.md

rgb555conv - converts 24 bit color to 15 bit color

I got tired of manually converting 24 bit hex colors (like 0xRRGGBB) into 15 bit BGR555 colors (like 0b0BBBBBGGGGGRRRRR) so I slapped this together to do it for me. Be warned that the 4 character color it outputs is in BGR format for use on the Game Boy Color and the Game Boy Advance instead of RGB. It also outputs a 24 bit representation of the 15 bit color (still in 0xRRGGBB) for use in things like your sprite software.

It outputs a rounded down and rounded up variant, it's up to you to look at it and decide which you like, because they may differ significantly.

compiling:

git clone https://tildegit.org/nytpu/rgb555conv.git
cd rgb555conv
gcc -Wall -pedantic -W -o rgb555conv main.c