Created
August 10, 2015 21:43
-
-
Save EntranceJew/9d1b05ec1cce01b7a67f to your computer and use it in GitHub Desktop.
In the event the LOVE api uses 0-1 instead of 0-255, break these functions out and cry deeply.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cssify(...) | |
local args={...} | |
for k,v in pairs(args) do | |
args[k] = v / 255 | |
end | |
return args | |
end | |
function uncssify(...) | |
local args={...} | |
for k,v in pairs(args) do | |
args[k] = v * 255 | |
end | |
return args | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment