ClaudiaJ

hexColorAPI

Jun 24th, 2013
1,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. -- white, orange, magenta, lightBlue, yellow, lime, pink, gray, lightGray, cyan, purple, blue, brown, green, red, black
  2. local defHex = { 0xFFFFFF, 0xFFA500, 0xFF00FF, 0xADD8E6, 0xFFFF00, 0x00FF00, 0xFFC0CB, 0x808080, 0xD3D3D3, 0x00FFFF, 0x800080, 0x0000FF, 0xA52A2A, 0x008000, 0xFF0000, 0x000000 }
  3. local color
  4. hexColors = {}
  5.  
  6. for i = 1, #defHex do
  7.     color = bit.blshift(1, i - 1)
  8.     table.insert(hexColors, color, defHex[i])
  9. end
Advertisement
Add Comment
Please, Sign In to add comment