Taurus99 Posted September 29, 2006 Posted September 29, 2006 Is there any existing function to convert RGB values to HLS (Hue, Luminosity and Saturation)? or existing script? I want to use GetPixelColor and find out the HLS values for it. Thanks.
jvanegmond Posted September 29, 2006 Posted September 29, 2006 (edited) You can get some example value's with the _ChooseColor() function. Example:#include <Misc.au3> _ChooseColor() Edited September 29, 2006 by Manadar github.com/jvanegmond
Taurus99 Posted September 30, 2006 Author Posted September 30, 2006 Awesome stuff. I made a slight tweak.Original Code: ;convert to 0-255 ranges ;h [0-360], h,l [0-1] $l *= 240 $s *= 240 $h = ($h/360)*240Replacement Code (switch to 255 as max): ;convert to 0-255 ranges ;h [0-360], h,l [0-1] $l *= 255 $s *= 255 $h = ($h/360)*255After that change, its perfectly matches the data in MouseZoom which I use: Larry, where you found the code, is there's a RGB/HSL conversion to CMYB (Cyan Magena Yellow Black) code?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now