Hi Jean,
i suppose you have your 10 colors set up as Color Controls on a Null layer ?
(see attachment)
The basic way of animating with markers could then be like this:
expression on any color- property:
markers = thisLayer.marker; // can also be thisComp.marker or another layer's markers.
colorsLayer = thisComp.layer("colors"); // a Null layer where the colors are stored as named color control effects
transitionTime = framesToTime(15);
nearestMarker = markers.nearestKey(time);
// do the necessary stuff to get current and previous markers without errors:
curMarker = markers.key(
clamp( nearestMarker.index - (nearestMarker.time>time) , 1, markers.numKeys)
);
prevMarker = markers.key(
clamp( nearestMarker.index - (nearestMarker.time>time) -1, 1, markers.numKeys)
);
colorName_1 = prevMarker.comment;
colorName_2 = curMarker.comment;
if (curMarker.index == 1) {
colorValue_1 = value; // we are before the first marker and default to the original value
} else {
colorValue_1 = colorsLayer.effect(colorName_1)("Color").value;
}
colorValue_2 = colorsLayer.effect(colorName_2)("Color").value;
linear(time, curMarker.time, curMarker.time+transitionTime, colorValue_1, colorValue_2);
If you want to actually do this within subcomps based on markers in another comp, (the exact oprder wasn’t clear to me from your explanation) then it might be better to also use essential properties, so the animation of certain things within the precomp can be done in the current timeline.