How to have a smooth transition with UIGradients

I want to create a smooth transition effect for frames. I’m kinda getting close, however I can’t think of a solution for the starting frame
image

-- Create stage frame
local function CreateStageFrame(currentDistance, color, stage)
	local NewStage = StageTemplate:Clone()
	NewStage.Size = UDim2.new(1, 0, currentDistance / TotalSize, 0)
	NewStage.Name = stage
	
	if PreviousColor then
		local StartingColor = ColorSequenceKeypoint.new(0, color)
		local FirstTransition = ColorSequenceKeypoint.new(0.3, color)
		local SecondTransition = ColorSequenceKeypoint.new(0.7, PreviousColor)
		local EndingColor = ColorSequenceKeypoint.new(1, PreviousColor)
		
		NewStage.UIGradient.Color = ColorSequence.new({StartingColor, FirstTransition, SecondTransition, EndingColor})
	else
		
	end
	
	PreviousColor = color
	
	NewStage.Parent = Stages
	
	return NewStage
end

The starting frame is stuck being plain white as it’s the first frame that’s created (and so a PreviosColor does not exist yet)

I don’t know if this is a good idea but surely you can just move the first frame off the crop?

Are you not able to preset PreviousColor to something and go from there?

PreviousColor = -- the first color
CreateStageFrame(distance, newColor, stage)