Create a gist now

Instantly share code, notes, and snippets.

@mikequentel /rgb.nim
Last active Aug 29, 2015

What would you like to do?
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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment