문제

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?

도움이 되었습니까?

해결책

Figured it out - my lum value should have been using relative luminance instead.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top