颜色库更新
This commit is contained in:
@@ -1,62 +1,88 @@
|
||||
local rnd=math.random
|
||||
local sin=math.sin
|
||||
local COLOR={
|
||||
red={1,0,0},
|
||||
green={0,1,0},
|
||||
blue={.2,.2,1},
|
||||
yellow={1,1,0},
|
||||
magenta={1,0,1},
|
||||
cyan={0,1,1},
|
||||
purple={.5,0,1},
|
||||
orange={1,.6,0},
|
||||
grey={.6,.6,.6},
|
||||
red= {1.0, 0.0, 0.0},
|
||||
fire= {1.0, 0.4, 0.0},
|
||||
orange= {1.0, 0.6, 0.0},
|
||||
yellow= {1.0, 1.0, 0.0},
|
||||
lame= {0.7, 1.0, 0.0},
|
||||
grass= {0.5, 1.0, 0.0},
|
||||
green= {0.0, 1.0, 0.0},
|
||||
water= {0.0, 1.0, 0.6},
|
||||
cyan= {0.0, 1.0, 1.0},
|
||||
sky= {0.0, 0.7, 1.0},
|
||||
sea= {0.0, 0.3, 1.0},
|
||||
blue= {0.2, 0.2, 1.0},
|
||||
purple= {0.4, 0.0, 1.0},
|
||||
grape= {0.7, 0.0, 1.0},
|
||||
magenta= {1.0, 0.0, 1.0},
|
||||
pink= {1.0, 0.0, 0.5},
|
||||
|
||||
lRed={1,.5,.5},
|
||||
lGreen={.5,1,.5},
|
||||
lBlue={.6,.6,1},
|
||||
lYellow={1,1,.5},
|
||||
lMagenta={1,.5,1},
|
||||
lCyan={.5,1,1},
|
||||
lPurple={.8,.4,1},
|
||||
lOrange={1,.7,.3},
|
||||
lGrey={.8,.8,.8},
|
||||
lRed= {1.0, 0.5, 0.5},
|
||||
lFire= {1.0, 0.7, 0.5},
|
||||
lOrange= {1.0, 0.8, 0.3},
|
||||
lYellow= {1.0, 1.0, 0.5},
|
||||
lLame= {0.8, 1.0, 0.4},
|
||||
lGrass= {0.6, 1.0, 0.4},
|
||||
lGreen= {0.5, 1.0, 0.5},
|
||||
lWater= {0.4, 1.0, 0.7},
|
||||
lCyan= {0.5, 1.0, 1.0},
|
||||
lSky= {0.5, 0.8, 1.0},
|
||||
lSea= {0.5, 0.6, 1.0},
|
||||
lBlue= {0.6, 0.6, 1.0},
|
||||
lPurple= {0.7, 0.4, 1.0},
|
||||
lGrape= {0.8, 0.4, 1.0},
|
||||
lMagenta= {1.0, 0.5, 1.0},
|
||||
lPink= {1.0, 0.4, 0.7},
|
||||
|
||||
dRed={.6,0,0},
|
||||
dGreen={0,.6,0},
|
||||
dBlue={0,0,.6},
|
||||
dYellow={.6,.6,0},
|
||||
dMagenta={.6,0,.6},
|
||||
dCyan={0,.6,.6},
|
||||
dPurple={.3,0,.6},
|
||||
dOrange={.6,.4,0},
|
||||
dGrey={.3,.3,.3},
|
||||
dRed= {0.6, 0.0, 0.0},
|
||||
dFire= {0.6, 0.3, 0.0},
|
||||
dOrange= {0.6, 0.4, 0.0},
|
||||
dYellow= {0.6, 0.6, 0.0},
|
||||
dLame= {0.5, 0.6, 0.0},
|
||||
dGrass= {0.3, 0.6, 0.0},
|
||||
dGreen= {0.0, 0.6, 0.0},
|
||||
dWater= {0.0, 0.6, 0.4},
|
||||
dCyan= {0.0, 0.6, 0.6},
|
||||
dSky= {0.0, 0.4, 0.6},
|
||||
dSea= {0.0, 0.2, 0.6},
|
||||
dBlue= {0.0, 0.0, 0.6},
|
||||
dPurple= {0.2, 0.0, 0.6},
|
||||
dGrape= {0.4, 0.0, 0.6},
|
||||
dMagenta= {0.6, 0.0, 0.6},
|
||||
dPink= {0.6, 0.0, 0.3},
|
||||
|
||||
pink={1,0,.6},
|
||||
grass={.6,1,0},
|
||||
water={0,1,.6},
|
||||
sky={.6,.75,1},
|
||||
|
||||
black={0,0,0},
|
||||
white={1,1,1},
|
||||
black= {0.0, 0.0, 0.0},
|
||||
dGrey= {0.3, 0.3, 0.3},
|
||||
grey= {0.6, 0.6, 0.6},
|
||||
lGrey= {0.8, 0.8, 0.8},
|
||||
white= {1.0, 1.0, 1.0},
|
||||
}
|
||||
local list_norm={"red","green","blue","yellow","magenta","cyan","purple","orange","pink","grass"}
|
||||
local map={
|
||||
R="red", G="green", B="blue", C="cyan", Y="yellow", M="magenta",
|
||||
lR="lRed", lG="lGreen",lB="lBlue", lC="lCyan", lY="lYellow", lM="lMagenta",
|
||||
dR="dRed", dG="dGreen",dB="dBlue", dC="dCyan", dY="dYellow", dM="dMagenta",
|
||||
W="white",
|
||||
}for k,v in next,map do COLOR[k]=COLOR[v]end
|
||||
|
||||
local list_norm={"red","fire","orange","yellow","lame","grass","green","water","cyan","sky","sea","blue","purple","grape","magenta","pink"}
|
||||
local len_list_norm=#list_norm
|
||||
local rnd=math.random
|
||||
function COLOR.random_norm()
|
||||
return COLOR[list_norm[rnd(len_list_norm)]]
|
||||
end
|
||||
|
||||
local list_bright={"lRed","lGreen","lBlue","lYellow","lMagenta","lCyan","lPurple","lOrange"}
|
||||
local list_bright={"lRed","lFire","lOrange","lYellow","lLame","lGrass","lGreen","lWater","lCyan","lSky","lSea","lBlue","lPurple","lGrape","lMagenta","lPink"}
|
||||
local len_list_bright=#list_bright
|
||||
function COLOR.random_bright()
|
||||
return COLOR[list_bright[rnd(len_list_bright)]]
|
||||
end
|
||||
|
||||
local list_dark={"dRed","dGreen","dBlue","dYellow","dMagenta","dCyan","dPurple","dOrange"}
|
||||
local list_dark={"dRed","dFire","dOrange","dYellow","dLame","dGrass","dGreen","dWater","dCyan","dSky","dSea","dBlue","dPurple","dGrape","dMagenta","dPink"}
|
||||
local len_list_dark=#list_dark
|
||||
function COLOR.random_bright()
|
||||
return COLOR[list_dark[rnd(len_list_dark)]]
|
||||
end
|
||||
|
||||
local sin=math.sin
|
||||
function COLOR.rainbow(phase)
|
||||
return
|
||||
sin(phase)*.4+.6,
|
||||
|
||||
Reference in New Issue
Block a user