You can create custom key colors for your Dope Sheet keys with MEL. You can set the shade and value of each color you create, as well as specify to which key states they are applied.
For example, you can create a custom key color that is a medium blue, and then specify that a high value of the blue be applied to selected keys and a low value of the color be applied to unselected keys.
To change the color of keys in the Dope Sheet with MEL
select pSphere1_translateX;
addAttr -ln dopeSheetColorScheme -at compound -nc 3; addAttr -ln keyframeActive -dt float3 -m -p dopeSheetColorScheme; addAttr -ln keyframeInactive -dt float3 -m -p dopeSheetColorScheme; addAttr -ln colorPriority -at short -p dopeSheetColorScheme;
Use [0] to set the low color value and [1] to set the high color value. Also, use keyframeActive to specify that the custom color be applied to selected keys only, or keyframeInactive to specify that the custom color be applied to unselected keys only. For example:
setAttr pSphere1_translateX.dopeSheetColorScheme.keyframeActive[0] -type float3 0.5 0 0; setAttr pSphere1_translateX.dopeSheetColorScheme.keyframeActive[1] -type float3 1 0 0; setAttr pSphere1_translateX.dopeSheetColorScheme.keyframeInactive[0] -type float3 0 0 0.5; setAttr pSphere1_translateX.dopeSheetColorScheme.keyframeInactive[1] -type float3 0 0 1;
setAttr pSphere1_translateX.dopeSheetColorScheme.colorPriority 0;
colorPriority determines which of your child channels’ custom colors (such as pSphere1_translateX or pSphere1_rotateY) are inherited by your parent channel (such as pSphere1).
The summary objects do not display the custom key colors that you have created. Instead, they only display the color information in the priority channel.