79 547
contributi
(Removing ChooseColor.forPokeTypes (part 3) *** sovrascritto il testo esistente ***) |
(Fixing script error with text colors *** sovrascritto il testo esistente ***) |
||
end
return ((col + 0.055) / 1.055) ^ 2.4
end
-- Given a color name and an optional shade, retrieve the corresponding hex
-- from modulo colore
local function getHexFromMod(color, shade)
assert(colorData, "Unknown color name: " .. color)
if type(colorData) == "table" then
else
return colorData
end
end
-- interface
p.forModBgLua = function(color, shade)
▲ shade = shade or 'normale'
▲ local colorHex = colorMod[color][shade]
▲ return p.forBgLua(colorHex)
end
-- Given a background module color, return the most appropriate text color
return p.forModBgLua(col1)
else
return p.forGradBgLua(
getHexFromMod(col2, "normale"))
end
end
|