Skip to content

Instantly share code, notes, and snippets.

@BilHim
Last active May 18, 2020 04:36
Show Gist options
  • Save BilHim/984031c65f93ff1deb346aba44d25920 to your computer and use it in GitHub Desktop.
Save BilHim/984031c65f93ff1deb346aba44d25920 to your computer and use it in GitHub Desktop.
def getColor(x, y):
a = pnoise2(x/scale,
y/scale,
octaves = octaves,
persistence = persistence,
lacunarity = lacunarity)
a = int(127*(a+1)) # a is between -1 and 1, this gives us values between 0 and 255
return (a,)*3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment