title: How to add random hex code command with discord.py?
body: <p>I am trying to make a command that would display a random hex code with a command such as <code>%randhex</code>, but so far I haven't found any working solutions. Does anyone know how I can do this? I tried doing something like this but with individual codes but there are too many. Here is one way I have tried:</p>
  <pre class="lang-py prettyprint-override"><code>@client.command(pass_context=True)
  async def randcolor(ctx):
      variable = [
          &quot;blue&quot;,
          &quot;red&quot;,
          &quot;green&quot;,
          &quot;yellow&quot;,
          &quot;purple&quot;,
          &quot;orange&quot;,
          &quot;white&quot;,
          &quot;black&quot;,
          &quot;violet&quot;,
          &quot;brown&quot;,
          &quot;aqua&quot;,
          &quot;cyan&quot;,
          &quot;maroon&quot;,
          &quot;grey&quot;]
      await client.say(ctx.message.channel, &quot;{}&quot;.format(random.choice(variable)))
  </code></pre>