How to modify color brightness in C#?

2019-09-01 13:44发布

In c#, you can get the HSL brightness of a color by doing Color.GetBrightness(). If I want to increase the brightness of a color by a certain percentage, I cannot simply multiply the individual RGB values by that amount. It seems HSL doesn't work like that. How would I do it?

1条回答
贪生不怕死
2楼-- · 2019-09-01 14:10

I think this article can help you with this and all other color related questions. It has C# source for all conversions and modifications.

RGB and HSL Colour Space Conversions

查看更多
登录 后发表回答