Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TurtleArt/tabasics.py10
-rw-r--r--TurtleArt/taconstants.py5
2 files changed, 7 insertions, 8 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index 9a921b4..581457b 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -67,7 +67,7 @@ from gettext import gettext as _
from tapalette import (make_palette, define_logo_function)
from talogo import (primitive_dictionary, logoerror)
from tautils import (convert, chr_to_ord, round_int, strtype)
-from taconstants import (LOGOCOLORDICT, COLORDICT, CONSTANTS)
+from taconstants import (COLORDICT, CONSTANTS)
def _color_to_num(c):
@@ -1382,8 +1382,12 @@ variable'))
def _make_constant(self, palette, block_name, label, constant):
""" Factory for constant blocks """
- if constant in LOGOCOLORDICT:
- value = str(LOGOCOLORDICT[constant])
+ if constant in COLORDICT:
+ if COLORDICT[constant][0] is not None:
+ value = str(COLORDICT[constant][0])
+ else:
+ # Black or White
+ value = '0 tasetshade %d' % (COLORDICT[constant][1])
else:
value = constant
palette.add_block(block_name,
diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py
index 4961b24..6f48c30 100644
--- a/TurtleArt/taconstants.py
+++ b/TurtleArt/taconstants.py
@@ -92,11 +92,6 @@ COLORDICT = {'_black': [None, 0, 0], '_white': [None, 100, 0],
'_cyan': [50, 50, 100], '_blue': [70, 50, 100],
'_purple': [90, 50, 100]}
-LOGOCOLORDICT = {'_black': 0, '_white': 1, '_red': 2, '_orange': 3,
- '_yellow': 3, '_green': 4, '_cyan': 5, '_blue': 6,
- '_purple': 7}
-
-
# Blocks that are expandable
EXPANDABLE_STYLE = ['boolean-style', 'compare-porch-style', 'compare-style',
'number-style-porch', 'number-style', 'basic-style-2arg',