this is a simple code to save :
local redfirst,greenfirst,bluefirst,redsecond,greensecond,bluesecond,redthird,greenthird,bluethird,redfourth,greenfourth,bluefourth = getVehicleColor(veh, true)
local color = toJSON({redfirst,greenfirst,bluefirst, redsecond,greensecond,bluesecond, redthird,greenthird,bluethird, redfourth,greenfourth,bluefourth})
and this is a code to load the color:
local redfirst,greenfirst,bluefirst,redsecond,greensecond,bluesecond,redthird,greenthird,bluethird,redfourth,greenfourth,bluefourth = unpack(fromJSON(color))
setVehicleColor(veh, redfirst,greenfirst,bluefirst,redsecond,greensecond,bluesecond,redthird,greenthird,bluethird,redfourth,greenfourth,bluefourth)