Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Color Clamping #38
After using a measure for each color (http://rainmeter.net/forum/viewtopic.php?f=14&t=20437), I tried to create the long version of Clamp() inline with LineColor, and that works, however, it's extremely unwieldy.
I find it odd that the Color::MakeARGB function seems to accept values above and below 255 and does what seems to be a modulo operation on them. Which may be a by product of casting somewhere within their API.
Is there any reason not to clamp the color range here:
I'm not clear if it's a common practice to take advantage of this "looping" pattern.
If anyone is curious about an easier work around for this: https://gist.github.com/HakShak/e6225c488b4a1bfea1c0