The only thing I had to do was create a function that gets the keypoint colors:
function GetColors(sequence)
local colors = {}
for i, v in pairs(sequence.Keypoints) do
table.insert(colors, v.Value)
end
return colors
end
local colors = GetColors(Gradient.Color)