title: where can i find a list of hex color codes to use in python?
body: <p>i am doing a small practice project using the turtle graphics module. i have created 8 turtles and want to change their color randomly. i was thinking of using the random module to make a random choice for a color. but for that, i would need a list of the hex codes of colors in string format. where can i find such a list? or if there is a library which has such a list, that would work too.</p>
  
  <pre><code>import turtle
  import random
  
  p1 = turtle.Turtle()
  p2 = turtle.Turtle()
  p3 = turtle.Turtle()
  p4 = turtle.Turtle()
  p5 = turtle.Turtle()
  p6 = turtle.Turtle()
  p7 = turtle.Turtle()
  p8 = turtle.Turtle()
  players = [p1, p2, p3, p4, p5, p6, p7, p8]
  
  colors = []  # need a list of hex codes of colors
  
  for player in players:
      player.shape('turtle')
      player.color(random.choice(colors))
      player.pu()
      player.goto(-225, 180 - 27*players.index(player))
  
  
  while True:
      for _ in players:
          _.forward(random.randint(1, 10))
  
  
  turtle.done()
  </code></pre>
  
  <p>i have copied the relevant part of my code here. how can i find a list of colors which the turtle library recognizes?</p>