remaking swatch (sorta): xy data into rgb data?

Peter Nyboer's icon

i need to make a simple color picker of a fixed size. My thought is to have an image of the swatch in a pictslider, and I can use xy data to create rgb values. The question is - how do i map the coordinates into RGB? What's the function?

seejayjames's icon

No need for a function. Use the oft-overlooked "sucka" object in the palette (looks like a needle). Can send RGB of whatever you click on, or arbitrary screen coordinates. So you can have a nice big swatch looking any way you want, or a wheel, etc. as a picture, and just put the sucka rectangle on it.

Also nice for picking colors out of images or movies.

--CJ

jvkr's icon
Max Patch
Copy patch and select New From Clipboard in Max.

_
johan

Peter Nyboer's icon

suckah...a good idea, but not practical for my needs.
that little patch is PERFECT, thanks jvkr.

Lorenz Rommelspacher's icon

I'd like to revive this thread. I have the same problem as mentioned above. The patch JVKR provided doesn't work anymore though :/

Source Audio's icon

translated from the past :

Max Patch
Copy patch and select New From Clipboard in Max.

Lorenz Rommelspacher's icon

That's amazing,
thanks!