WPF Color interpolation

后端 未结 5 1238
离开以前
离开以前 2021-01-15 14:43

I am trying to paint a WPF control\'s background based on a palette where each color has been assigned with values (e.g. Red = 0, DarkGreen = 10, Green = 20,LightGreen =30)

5条回答
  •  情深已故
    2021-01-15 15:21

    Thanks for all the replies guys. It seems there is no way to get the "value" of a GradientBrush at a specified point. I hope this is corrected at some later version of the framework. So I guess the only option for now is to implement an interpolation algorithm as Mikko suggested.

提交回复
热议问题