* Use Turbo mode! A "Picture with All Colours" project - 32,768 different hsb colours on 32,768 pixels. This project starts by placing 1 pixel in the centre of the screen with a mid value hsb colour. It then looks at the neighbours of this pixel (in a random order) and assigns the closest unused colours to them. This is repeated - processing the neighbours of the neighbours etc etc. How a "Closest" Colour is Found -------------------------------------------- Imagine a colour cube with hue, saturation and brightness along the X, Y and Z axes. We start at the the colour of the current pixel and search a surrounding cube for a closest unused colour. If no unused colour is found, we expand the cube then search the new faces. We use Pythagoras with a heavy weighting for the hue component to find the closest colour and choose randomly if some colours are equidistant. Randomness ------------------ - the project checks the four possible neighbours of a pixel (above, below, right and left) in a random order. - The neighbours of a set of pixels become the start pixels for the next generation. We shuffle these. - When there is more than one equidistant closest colour the project chooses randomly. Project based on the projects by Jozsef Fejes which can be seen on the following websites: https://codegolf.stackexchange.com/questions/22144/images-with-all-colors https://allrgb.com/
"Pictures with All Colours" Studio: https://scratch.mit.edu/studios/13731433/ Forum: AMC #8 - Pictures with All Colours Challenge https://scratch.mit.edu/discuss/topic/353218/ Algorithm based on the projects by Jozsef Fejes which can be seen on the following websites: https://codegolf.stackexchange.com/questions/22144/images-with-all-colors https://allrgb.com/