diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-24 18:48:02 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-24 18:48:02 -0500 |
commit | cf89bc6a24a1e300afc01f8633d81cc7111e7da7 (patch) | |
tree | ca371be6c36e3478d4f5a3e8bc25462e10592f17 | |
parent | 50013d21d1a56b1a48c32e281d2bb9e5a96f931b (diff) | |
download | unifieddyes-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.lua | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |