Repository navigation
Modify Makefile - remove transparent color from rgbgfx palette - #203
Merged
Merged
Conversation
In sprite generation command: removed the index 0 color use for transparency (here #FFFFF) from the palette.
Update sprite generation command in Makefile
Rangi42
requested changes
Nov 2, 2026
Contributor
There was a problem hiding this comment.
Using an explicit #none as the first color is the most reliable solution here.
RGBGFX 1.0.4 "fixed omitting a transparent color from explicitly-specified palettes if the image has transparency". So 3-color -c palettes for an image with transparent pixels will work in 1.0.4, but not 1.0.3 and below. Likewise, a 4-color -c palette for an image with transparent pixels (i.e. a fifth color) will not work work in 1.0.4 (and it ever working was a bug).
Here's what happens with a 4-color palette:

And a 4-entry palette with #none:

#none has been supported ever since RGBDS 0.8.0 in 2024.
Use #none as the first color instead of removing it. This maintains compatiblity with previous rgbgfx versions. Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
Rangi42
approved these changes
Nov 2, 2026
avivace
approved these changes
Nov 3, 2026
avivace
left a comment
Member
There was a problem hiding this comment.
Thanks @Rangi42 and @Simon-Hed !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In Tutorial part III the makefile generates an rgbgfx instruction with four colors for sprites with transparent pixels.
Up until recently: specifying a four-color palette in
rgbgfx -cwith images containing transparent pixels would somehow work in this tutorial.After updating to RGBDS_v1.0.4: it would result in an error.
Example:
rgbgfx -c "#FFFFFF,#cfcfcf,#686868,#000000;" --columns -o .\src\generated\sprites\player-ship.2bpp .\src\resources\sprites\player-ship.png error: Each palette spec can only contain up to 3 colors plus the implict transparent color Conversion aborted after 1 errorThe fix:
rgbgfx -cforces color 0 of every palette to be transparent in the case of images with transparent pixels. Only the three non-transparent colors should be specified. This means removing the first color#FFFFFFwhen makefile generates sprites.