Thanks for the info! If you dont mind me asking, how did you actually write the python script? I'm tempted to make my own (though much smaller scale) map akin to this
By knowing python I guess, there's not really a secret recipe here, the bulk of the data I manipulate is in a ginormous json file that I read through
the json library to dump into a
dictionary, and I read and write images through
PIL.image.
I generate similar colours by grabbing (R, G, B) with
random.randint and then (R+20, G, B), (R, G+20, B), (R, G, B+20), (R+20, G+20, B), etc... And when I want them blue, I ensure that B > G > R.
I check they're unique by keeping a
set of already used colours at all times.
The striping itself looks like this:
for pixel in pixels:
....if (max_x - min_x) > (max_y - min_y):
........index = int((pixel[0] - min_x) // ((max_x - min_x) / len(new_colors)))
....else:
........index = int((pixel[1] - min_y) // ((max_y - min_y) / len(new_colors)))
....while index >= len(new_colors):
........index -= 1
....img.putpixel(pixel, new_colors[index])
img.save("output.png")
Where:
- pixels is a list of (x, y) coordinate tuples for a province (soon to be cut into locations)
- max_x, min_x, max_y, min_y are the min and max coordinates belonging to the province
- the if/else decides whether the strips are horizontal or vertical
- new_colors is a bunch of new colours generated through the (R+20, G, B) thingy
- img is the image read through PIL
- the while is bullshit, I must have been half-awake then

could have been index = max(index, len(new_colors) - 1) (to avoid trying to grab colour number 12 if you only have generated 11)