Skip to content

Instantly share code, notes, and snippets.

@mikequentel
Last active August 29, 2015 14:10
Show Gist options
  • Save mikequentel/d74507a6c3738869150b to your computer and use it in GitHub Desktop.
Save mikequentel/d74507a6c3738869150b to your computer and use it in GitHub Desktop.
How to Create a Text File List of RGB Values in Nim (aka Nimrod)
proc main() =
var fp = open("true_colour_nimrod.txt", fmWrite)
var r = 255
var g = 255
var b = 255
for r in countdown(255, 0):
for g in countdown(255, 0):
for b in countdown(255, 0):
fp.write(r)
fp.write(",")
fp.write(g)
fp.write(",")
fp.write(b)
fp.write("\n")
finally: fp.close()
main()
@mikequentel
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment