Merged
Conversation
This was referenced Feb 24, 2026
update for BitmapLabel color_palette argument handling
adafruit/Adafruit_Learning_System_Guides#3207
Merged
tannewt
approved these changes
Feb 24, 2026
Member
tannewt
left a comment
There was a problem hiding this comment.
Thank you! Need a major version bump?
Contributor
Author
|
Yeah, it is technically breaking the old behavior. Will bump major version. |
adafruit-adabot
pushed a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Feb 25, 2026
Updating https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font to 2.4.0 from 2.3.3: > Merge pull request adafruit/Adafruit_CircuitPython_Bitmap_Font#74 from FoamyGuy/lvfont_support_higher_bpp Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 5.0.0 from 4.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#236 from FoamyGuy/color_palette_values
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.
colorandbackground_colorarguments were overriding the values that were present in 0 and 1 indexes ofcolor_palette. The API was kind of designed around end users not putting colors into indexes 0-2 of thecolor_palettethat is passed to label init and instead usingcolor,background_colorandoutline_colorarguments.Now I am working on anti-aliased font rendering and I want the entire
color_paletteto remain exactly how it was when created so that it will line up correctly with the color indexes used in the font glyph bitmaps.In hindsight I think it better to change it so that
color_paletteessentially "overrides" the other argumentscolor,background_colorandoutline_color. With the idea being that user code that is passing in a customizedcolor_paletteis doing so in order to retain complete custom control over the palette so BitmapLabel should not alter the values during init.I've updated the two examples that use
color_paletteto reflect the new behavior of defining all colors in the custom palette and removing usage of the other arguments. There is also 1 instance in the learn repo of code that usescolor_palettethat I will submit a PR to update as well.