Skip to content

Instantly share code, notes, and snippets.

@kr-stn
Created October 25, 2016 13:57
Show Gist options
  • Save kr-stn/805a09481b9093a1127104239c6de291 to your computer and use it in GitHub Desktop.
Save kr-stn/805a09481b9093a1127104239c6de291 to your computer and use it in GitHub Desktop.
Generate 5000 randomly colored QML styles for display of segmentation results.
import random
for value in range(5000):
print("<item alpha=\"255\" value=\"{}\" label=\"{}\" color=\"#{}\"/>".format(value, value, hex(random.randint(0, 16777215))[2:].upper()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment