Created
December 3, 2019 18:55
-
-
Save andybell/b063098a245fa3188d308a50ee4878fe to your computer and use it in GitHub Desktop.
Blindside make .clr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make value to rgb colormap for blindside data packing | |
minValue = 905 | |
maxValue = 552674 | |
mod = 256 | |
with open('fullrgb_values.clr', 'w') as fullclr: | |
for i in range(minValue, maxValue+1): | |
value = i | |
blue = i % mod | |
green = (i//mod) % mod | |
red = ((i//mod)//mod) % mod | |
line = f'{value} {red} {green} {blue}' | |
print(line) | |
fullclr.write(line + '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment