#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Fri, 03 Feb 2017 14:03:35 +0100
changeset 7832 9f302a33066b
parent 7831 460d842964af
child 7833 7cffe851a6d2
#FEATURE by cg class: Color added: #greenCaringForColorBlindness #redCaringForColorBlindness
Color.st
--- a/Color.st	Fri Feb 03 11:51:27 2017 +0100
+++ b/Color.st	Fri Feb 03 14:03:35 2017 +0100
@@ -1867,6 +1867,20 @@
     "Modified: 23.4.1996 / 13:23:08 / cg"
 !
 
+greenCaringForColorBlindness
+    "return the color to use for green,
+     possibly using anther color if the settings specifies color blindness"
+     
+    UserPreferences current useColorsForColorBlindness ifTrue:[
+        "/ for now: later, this will also be configurable
+        ^ self blue.
+    ] ifFalse:[
+        ^ self green.
+    ].
+
+    "Created: / 03-02-2017 / 14:02:26 / cg"
+!
+
 grey
     "return the grey color (English version ;-)"
 
@@ -2068,6 +2082,20 @@
     "Modified: 23.4.1996 / 13:29:44 / cg"
 !
 
+redCaringForColorBlindness
+    "return the color to use for green,
+     possibly using anther color if the settings specifies color blindness"
+     
+    UserPreferences current useColorsForColorBlindness ifTrue:[
+        "/ for now: later, this will also be configurable
+        ^ self red.
+    ] ifFalse:[
+        ^ self red.
+    ].
+
+    "Created: / 03-02-2017 / 14:02:50 / cg"
+!
+
 transparent
     "return the transparent-color"