How to modify color brightness in C#?

夙愿已清 提交于 2019-12-11 16:44:01

问题


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:


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



来源:https://stackoverflow.com/questions/5484389/how-to-modify-color-brightness-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!