How to make SeekBar segments, and each segment shows different colors?
<p>I have a project where  the seekbar is to be divided into three segments (not always equal). According to the progress of the slider, each segment will display different colors. </p>

<p>For example, assume that seekbar's maximum value is 100 so... </p>

<ul>
<li>progress to 0-10 when first shown in red.</li>
<li>progress for 10-80 when the first segment is shown in red, the second
segment display green.</li>
<li>progress for 80-100 when first shown in red, the second
segment show green, the third segment shows in yellow.</li>
</ul>

<p>Is there any way to achieve this?</p>

<p><strong>The effect chart is as follows:</strong></p>

<p><a href="https://i.stack.imgur.com/Vy4aZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vy4aZ.png" alt="enter image description here"></a></p>