[jitter] Colour palettes.
andrew benson
andrewb at cycling74.com
Thu Aug 23 12:24:34 MDT 2007
- Previous message: [jitter] Colour palettes.
- Next message: [jitter] Frame number read-out from QT?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
also...
If anyone is interested in converting these standard HEX color values to
integer RGB values, here is a little Javascript that does the job for me:
inlets = 1;
outlets = 3;
function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
function cutHex(h) {return (h.charAt(0)=="#") ? h.substring(1,7):h}
function anything()
{
outlet(0,HexToR(messagename));
outlet(1,HexToG(messagename));
outlet(2,HexToB(messagename));
}
AB
- Previous message: [jitter] Colour palettes.
- Next message: [jitter] Frame number read-out from QT?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
