-
Notifications
You must be signed in to change notification settings - Fork 80
Fix #22: Add documentation for converting RGB values to color palette indices #37
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
base: main
Are you sure you want to change the base?
Conversation
…palette indices Add a new section explaining how to convert arbitrary RGB color values to the closest Push 2 color palette index. This includes: - Instructions for retrieving the complete palette - Distance calculation methods (Euclidean and perceptual) - Alternative approach of modifying the palette with custom colors This addresses the question about translating Max For Live colors to Palette Color Index values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds documentation to address issue #22, which asks how to translate Max For Live colors to Push 2 color palette indices. The addition provides clear guidance on converting arbitrary RGB values to the closest available palette index, including algorithm steps and alternative approaches.
Changes:
- Added a new documentation section "Converting RGB Values to Color Palette Indices"
- Explains the constraint that Push 2 LEDs require palette indices (0-127) rather than direct RGB values
- Provides step-by-step algorithm with distance calculation methods (Euclidean and LAB color space)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rsu-ableton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text is good.
Two things should be mentioned, though:
-
If the palette is modified, this changes the respective colors for all Apps running in parallel (e.g. when using Max For Live); also, Live might reinstall it's palette when reconnecting to Push (this is also the reason why the default palette is not documented,it's usually overwritten)
-
There is sysex command 0x3b to assign an arbitrary RGB color to any LED, independently from the palette; strange enough we have no documented it, although there are people out there using it ...
Here is the documentation
Arbitrary RGB LED Color
In addition to the index color palette with 128 entries,
it is possible to set individual LEDs to arbitrary RGB color.
The color will be in effect until either a different color is
sent or the color is set to a palette entry using the respective
control change (CC) or note-on message. The specified RGB color
(3x8 bit) is subject to the same processing as the RGB values from
the palette, i.e. white balancing, color spaces, brightness and
animation. The function is not needed for white leds as for these
the existing palette essentially covers the possible range of values.
Command 0x3b: Set Arbitrary RGB LED Color
Set the RGB value for the LED given by CC/note number, with
the respective channel to chose the animation. The CC/note number
and channel are the same as in the note/CC message sent to chose
a color from the palette. The change is immediately applied.
tc - type and channel:
000cccc for note-on
001cccc for CC
n - note/CC number (0..127)
r(LSB) - lower 7 bits of red color
r(MSB) - higher 1 bit of red color
g(LSB) - same for green color
g(MSB)
b(LSB) - same for blue color
b(MSB)
|
I'm through with the PRs now. Big thanks for the work on this documentation. |
|
How interesting about the 0x3b sysex, I’d probably have used that in Afterglow if I knew about it rather than constantly messing with the palette. Maybe I should do some benchmarking to see if it’s worth changing approach. |
Fixes issue #22: How to translate Max For Live colors to Palette Color Index?
Adds a new section explaining how to convert arbitrary RGB color values to
the closest Push 2 color palette index.
Changes:
Files Changed:
Ready for squash-and-merge.