I have 2 string representations of colors (ex: "#FFFFFF
" and "#000000
") and I am looking for a way to get the median color of these two colors programmatically. The color I call "median" would be the color that meets these two in the center.
I need this in order to draw a gradient in 2 steps :
- 1 gradient from the first color to the median
- 1 gradient from the median to the second color
So that it looks like 1 gradient from the first to the second color, which I cannot do.
How can I achieve that?