Anonymous
12/08/2017 (Fri) 15:18:26
[Preview]
No.11878
del

>>11861That's cool, but it's not really what I'm after. The way I think this should be handled is with 16 lists, each containing the red, green and blue value. eg:

rgb0 = [21, 21, 21]

rgb1 = [32, 32, 32]

rgb2 = [48, 48, 48]

I want to find all possible combinations of adding the values in those lists one to each other at a time. I can do one on one with numpy:

import numpy as np

np.add(rgb0, rgb0)

np.add(rgb0, rgb1)

np.add(rgb0, rgb2)

np.add(rgb1, rgb1)

np.add(rgb1, rgb2)

np.add(rgb2, rgb2)

What I think I need now is some logic to do it in sequence. I know there will be duplicates but thankfully the total combination will be 256 which is the exact number of colours in a palette. Then just to output to file.