With the createLinearGradient we can create color gradient and colors blend as per the stop value in addColorStop.
createLinearGradient
addColorStop
var gradient = ct