function Colorstr_Colortable(color) --字符串 转 table local Color = {} for w in string.gmatch(color,"[^,]+") do local i = 0 local t = {} for xy in string.gmatch(w,"[^|]+") do i = i + 1 if i == 1 then t.x = tonumber(xy) end if i == 2 then t.y = tonumber(xy) break end end local co = string.sub(w,string.find(w,'0x'),-1) i = 0 for Degree in string.gmatch(co,"[^|]+") do i = i + 1 if i == 2 then t.degree = tonumber(Degree) break end end i = 0 for offset in string.gmatch(co,"[^-]+") do i = i + 1 if i == 2 then t.offset = tonumber("0x"..offset) break end end t.color = tonumber(string.sub(co,1,8)) table.insert(Color,t) end return Colorend--[[{ ['y'] = 268, ['x'] = 898, ['degree'] = 95, ['color'] = 2193658, ['offset'] = 0}]]