Using color palettes with 4-bit images #2014
Unanswered
Sofocletus
asked this question in
Q&A - General
Replies: 1 comment 8 replies
-
This example can be used as a basis for your needs: |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First of, thank you for the work you've put into this, I've been learning to use your library for a coupe months jumping from vanilla Arduinos to the ESP32 environment.
I'm not a proficient programmer so I've had problems figuring out how to use 4-bit images, in particular what I would like to do is to have a color index (say, 16 colors) so that for example I can have an image for a button that can display a grayed out disabled state, a ready state and a pressed state without needing 3 separate image arrays. The way I see it I could have three arrays of 16 colors and in pseudo-code I'd say pushSprite(X, Y, firstColorArray) or pushSprite(X, Y, secondColorArray)
Is that possible, and how would I go about doing it?
By the way, in my research I came across this amazing demos showing what can be done by changing the color palette: http://www.effectgames.com/demos/canvascycle/?sound=0
Beta Was this translation helpful? Give feedback.
All reactions