Hi everyone,

Im using and "Image Pixel" patch for one of my composition, and I need a custom patch or a javascript patch that have three inputs from the image pixel outputs
        
        Red Component
        Green Component
        Blue Component

and that convert that to a string output like "#FFFFFF"
Sadly I dont know anything about Javascript :(
Ive googled "javascript rgb hex" to find this piece of code

function RGBtoHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)}
function toHex(N) {
if (N==null) return "00";
N=parseInt(N); if (N==0 || isNaN(N)) return "00";
N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
return "0123456789ABCDEF".charAt((N-N%16)/16)
    + "0123456789ABCDEF".charAt(N%16);
}

So if anyone have already a written javascript for QC... im here!
(ps: I have cookies)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to