rgba8888-to-rgb332
is a cli tool that will process all files found in an input folder, transforming them from a file format containing full 16 million color PNG files to 8-bit raw data files. This is accomplished using a restrictive palette. Transparent pixels can be replaced with a specified color.
The RGB332 raw file outputs are useful for developing software using embedded graphics, where an 8-bit color palette can reduce memory usage drastically and adhere to certain display requirements.
Color masking is an optional feature provided, granting a way to choose a pixel color to skip when blitting pixels to a buffer. For example, if the color 0b11100011 (hex #ff00ff or #ff00ffff with transparency channel) is chosen, it is simple during development to add that pixel color to a branch statement, and omit drawing it to the screen. This provides the user to implement their own transparency.
MASK_COLOR
rgba8888-to-rgb332 -i <your_sprite_folder> -o <your_output_folder>
-m <mask_color>
argument0b00000000
or 0b000_000_00
for visual separation of the rgb channelsThe palette used to map RGBA8888 to RGB332 follows strict rules. For simplicity, it will be described using 8 character HEX color code rules.
```
```
```
```
```
```
```
``` Note: When the alpha channel is 00, the first 3 bytes of the pixel are ignored.