I need to call a function, in PHP, that accepts 3 parameters, RGB Values. This function converts RGB color values to HSL values, so (R,G,B) is needed in the parenthesis.
This is my function:
function RGBtoHSL($red, $green, $blue) {
// convert colors
}
Which, if I make a test call of the following, it works just fine:
RGBtoHSL(255,0,0);
and also works like this:
RGBtoHSL(255,000,000);
Now, further down my page I have a variable $displayRGB which holds the current pixels RGB values in this format xxx,xxx,xxx. I've echoed this variable to test the format matches my requirements and it does, but when I try and add this variable to my function caller, it fails with the error "Missing argument 2, Missing argument 3" and points to this line:
RGBtoHSL($displayRGB);
I'm still teething in PHP (come from ASP), can somebody please help point me in the right direction and pass me my dummy?