Min DevKit M4L color attributes

R Kumar's icon

I spent quite some amount of time trying to figure out how to use the live.colors object to link the Live color schemes to my external C++ UI object. For anyone struggling to make the link between the internal colour names given by live.colors and the names that are displayed on the dynamic colour list of a colour attribute, this post might help.

Here is how to define a colour attribute that is linked with the Abelton colour scheme using min-devkit:
attribute<color> attr_name{ //This is used to reference the attribute within our code
this, //Pointer to your our object
"attr_name", //Internal identifier for MAX. What we put here appears in the
//Attribute list that is displayed when typing the name of our
//component in max patcher
color {{1.,0.,0.,1.}}, //Default value - does not matter as the attribute is initialized to
//the live colour defined below
title {"active_automation"},//Name displayed in the object information panel for this
//attribute
description{"Live Color - Active Automation"}, //Helper description
live_color{"active_automation"} //The name here is the output of the live.color object
//when responding to "everything" message
};

Forgive the formatting above as I am still trying to figure out out to post effectively on this forum. The mapping of the internal live.color names to the names displayed on the colour picker when dynamic colours are selected is as below.
Note: Some of the displayed names are duplicates. I am not sure how live.color object differentiates them

Internal Name                Dislayed Name
active_automation            Automation
assignment_text_bg            Mapping Highlight
contrast_frame                Control Border
control_bg                    Control Off
control_fg                     Text / Icon On
control_fg_off                 Text / Icon Off
control_fg_off_zombie        Text / Icon Off (Inactive)
control_fg_on                 Text / Icon On
control_fg_on_zombie        Text / Icon On (Inactive)
control_fg_zombie            Control Range Off (Inactive)
control_fill_handle            Control Handle
control_selection             Control On
control_text_bg     Text Background
control_text_selection        Text / Icon On
control_text_zombie            Text / Icon On (Inactive)
control_zombie                Control On (Inactive)
dial_fg    Control              Range On
dial_fg_zombie                Control Range Off
dial_needle     Control Needle On
dial_needle_zombie            Control Needle Off
dial_triangle                 Control Triangle
display_handle_one            LCD Handle
display_handle_two            LCD Handle Variant
display_line_one             LCD Shape
display_line_two             LCD Shape Variant
display_scale_text            LCD Background Text
focus_frame    Control         Selection Frame
freeze_color                 Freeze
gain_reduction_line_color    Gain Reduction Line
inactive_automation            Automation Override
input_curve_color            Input Curve
input_curve_outline_color    Input Curve Outline
key_assignment                Mapping Key
lcd_bg    LCD                  Background
lcd_control_fg                LCD Text / Icon
lcd_control_fg_alt             LCD Text / Icon Variant
lcd_control_fg_zombie        LCD Text / Icon (Inactive)
lcd_frame                     LCD Line
led_bg                         LED Background
macro_assigned                Mapping Macro
macro_assignment            Mapping Macro
macro_title                    Control Header
meter_bg                     Control Background
midi_assignment                Mapping Midi
numbox_triangle                Numbox Triangle
output_curve_color            Output Curve
output_curve_outline_color    Output Curve Outline
selection                     Control Highlight
spectrum_alternative_color    Spectrum Variant
spectrum_default_color        Spectrum
spectrum_grid_lines            Spectrum Grid
surface_bg                    Device Background
surface_frame                Line
threshold_line_color         Threshold Line
value_arc                     Control On Variant
value_arc_zombie         Control Range On (Inactive)
value_bar                     Sliding Range Value

karhakonhronon  's icon

Thank you so much for this! How did you find the internal names?

R Kumar's icon

Hi - I am glad it helped. Its been a while.

I used the live.colours object and printed all the internal colours using the "everything" message. After that it was brute-force I am afraid to select each colour manually on a control and match it up with the Live Displayed name.