Reputation: 29153
I have two colors that I need to linearly interpolate to create a duotone color based of another color's luminance value.
Dim clr1 = Color.Black
Dim clr2 = Color.FromArgb(224, 255, 165)
Dim lum = Color.FromArgb(226, 189, 136).GetBrightness
'lum = 0.71
I know the result of this should be R=171, G=192, B=125, but I can't figure out how to do this. I've searched through SO quite a bit and all over Google, but have not discovered a way to produce this result. Can anyone help?
Upvotes: 3
Views: 364
Reputation: 29153
Figured it out - my lum
value should have been using relative luminance instead.
Upvotes: 1