What I’m trying to do is this: load image in Dynamo, set out pixel raster and get the colours at every pixel. I’ve gotten this far. But if there are 4000 pixels, chances are, I end up with 4000 colours. So I’m trying to reduce this amount.
I’ve managed to simplify the colours to 27 basic colours (RGB value is either 0, 128 or 255). Each colour gets a value between 1-27 so I can map these values to a parameter in my curtain panel.
But I don’t like these colours, there’s too much green and not enough red-orange.
So I was wondering if, instead of simplifying the colours, I could set up maybe 12 colours and have Dynamo match up the colours from the image to the closest colours of my pre-set list?
KHA_PrimaryColourOnSurface.dyn (76.3 KB)