-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support palette-based color #230
Comments
(if it isn't obvious, the "massive speedup" would come from being able to change colors via o(1) palette swap rather than o(N) walks of the planes, changing their colors). |
I've added bit definitions and some basic rendering needs be updated to use this, and then we need a demo (#253). |
* palette_set: update pal256 damage map #230 * drone: use newest builders * palette: send oc on exit for color reset #285 * palette_new: copy existing palette in #230 * Python: use checkRGB everywhere * more palette unit testing * add ncplane_set_*_palindex() * render fg palindex #230 * palette index color is out of 1000 * jungle demo works #253
It might be desirable to support an 8-bit notcurses-wide palette. This would allow for very fast palette fades and sprite tricks. We could hijack the 16 free bits from the attrword for a fore- and background palette, and 2 of 8 free bits from the channels. Then again, maybe we don't want to blow 75% of our free cell space on this idea.
If we do it, we alloc up 2x256x3 (~1.5KB) for the notcurses struct. the "default color" bits still take ultimate precedence. after that, we use the palette bits if the palette indicator bit is high, and the rgb bits otherwise. setting the rgb bits clears the palette indicator bit. setting the palette bits sets the PIB.
The text was updated successfully, but these errors were encountered: