- uint32_t r, g, b, a;
-
- UINT_TO_RGBA (color, &r, &g, &b, &a);
-
- /* Hack to disallow black route groups; force a dark grey instead */
- const uint32_t dark_gray = 25;
-
- if (r < dark_gray && g < dark_gray && b < dark_gray) {
- r = dark_gray;
- g = dark_gray;
- b = dark_gray;
- }
-
- GUIObjectState& gui_state = *ARDOUR_UI::instance()->gui_object_state;
-
- char buf[64];
-
- /* for historical reasons the colors must be stored as 16 bit color
- * values. Ugh.
- */
-
- snprintf (buf, sizeof (buf), "%d:%d:%d", (r<<8), (g<<8), (b<<8));
- gui_state.set_property (group_gui_id (group), "color", buf);
-
- /* the group color change notification */
-
- PBD::PropertyChange change;
- change.add (Properties::color);
- group->PropertyChanged (change);
-
- /* This is a bit of a hack, but this might change
- our route's effective color, so emit gui_changed
- for our routes.
- */
-
- emit_gui_changed_for_members (group);