FromArgb vs FromScRgb

前端 未结 4 2009
花落未央
花落未央 2020-12-20 07:43

Should these two expressions result in colors which are roughly the same?

Color.FromArgb(255, 255, 255, (byte)0.25 * 255))

Color.FromScRgb(1.0f, 1.0f, 1.0f,         


        
4条回答
  •  没有蜡笔的小新
    2020-12-20 08:26

    The basic reason behind this is mentioned by mzzzzb above:

    the scale 0.0 - 1.0 does not map linearly to 0 - 255

    I.e. the ScRgb components do not map linearly to the Argb components.

提交回复
热议问题