【问题标题】:How to Create a Duotone Interpolation Color in GDI+ (.NET)?如何在 GDI+ (.NET) 中创建双色调插值颜色?
【发布时间】:2010-06-08 22:51:54
【问题描述】:

我需要对两种颜色进行线性插值,以根据另一种颜色的亮度值创建双色调颜色。

Dim clr1 = Color.Black
Dim clr2 = Color.FromArgb(224, 255, 165)
Dim lum = Color.FromArgb(226, 189, 136).GetBrightness
'lum = 0.71

我知道这个结果应该是 R=171, G=192, B=125,但我不知道该怎么做。我已经搜索了SO 相当bit 和整个谷歌,但还没有找到产生这个结果的方法。有人可以帮忙吗?

【问题讨论】:

    标签: .net colors gdi+ linear-interpolation


    【解决方案1】:

    想通了 - 我的 lum 值应该使用 relative luminance 代替。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-08
      • 2013-06-05
      • 2013-08-14
      • 1970-01-01
      • 2012-01-24
      • 2011-03-20
      • 2015-07-09
      相关资源
      最近更新 更多