code_junkie

How to make a color from a number

Nov 13th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.08 KB | None | 0 0
  1. "#%02X0000" % x
  2.  
  3. def rgbtohex(r,g,b):
  4. return "#%02X%02X%02X" % (r,g,b)
Add Comment
Please, Sign In to add comment