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