summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-24 18:48:02 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-24 18:48:02 -0500
commitcf89bc6a24a1e300afc01f8633d81cc7111e7da7 (patch)
treeca371be6c36e3478d4f5a3e8bc25462e10592f17
parent50013d21d1a56b1a48c32e281d2bb9e5a96f931b (diff)
downloadunifieddyes-cf89bc6a24a1e300afc01f8633d81cc7111e7da7.tar
unifieddyes-cf89bc6a24a1e300afc01f8633d81cc7111e7da7.tar.gz
unifieddyes-cf89bc6a24a1e300afc01f8633d81cc7111e7da7.tar.bz2
unifieddyes-cf89bc6a24a1e300afc01f8633d81cc7111e7da7.tar.xz
unifieddyes-cf89bc6a24a1e300afc01f8633d81cc7111e7da7.zip
translate new dye names to old for 89-color palette check
-rw-r--r--init.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index f23693c..08f79b6 100644
--- a/init.lua
+++ b/init.lua
@@ -472,6 +472,18 @@ function unifieddyes.getpaletteidx(color, palette_type)
return (hues_extended[color] + shades_extended[shade]*24), hues_extended[color]
end
else -- it's the 89-color palette
+
+ -- If using this palette, translate new color names back to old.
+
+ if shade == "" then
+ if color == "spring" then
+ color = "aqua"
+ elseif color == "azure" then
+ color = "skyblue"
+ elseif color == "rose" then
+ color = "redviolet"
+ end
+ end
if hues[color] and shades[shade] then
return (hues[color] * 8 + shades[shade]), hues[color]
end