#DOCUMENTATION by cg
class: Color
class definition
comment/format in:
#red
#white
changed:
#orange
#yellow
--- a/Color.st Wed Nov 02 15:13:29 2016 +0100
+++ b/Color.st Wed Nov 02 15:28:22 2016 +0100
@@ -17,9 +17,9 @@
instanceVariableNames:'red green blue device colorId ditherForm replacementColor
writable'
classVariableNames:'MaxValue Cells Black White LightGrey Grey DarkGrey Pseudo0
- Pseudo1 PseudoAll Red Green Blue RetryAllocation DitherBits
- ColorErrorSignal ColorAllocationFailSignal InvalidColorNameSignal
- StandardColorValues Transparent'
+ Pseudo1 PseudoAll Red Green Blue Yellow Orange RetryAllocation
+ DitherBits ColorErrorSignal ColorAllocationFailSignal
+ InvalidColorNameSignal StandardColorValues Transparent'
poolDictionaries:''
category:'Graphics-Support'
!
@@ -2023,7 +2023,14 @@
orange
"return the orange color - ST-80 compatibility"
- ^ self orange:100
+ Orange isNil ifTrue:[
+ Orange := self redPercent:100 greenPercent:50 bluePercent:0.
+ ].
+ ^ Orange
+
+ "
+ Color orange inspect
+ "
!
orange: orange
@@ -2046,10 +2053,14 @@
"return the red color"
Red isNil ifTrue:[
- Red := self redPercent:100 greenPercent:0 bluePercent:0.
+ Red := self redPercent:100 greenPercent:0 bluePercent:0.
].
^ Red
+ "
+ Color red inspect
+ "
+
"Modified: 23.4.1996 / 13:29:44 / cg"
!
@@ -2112,15 +2123,26 @@
"return the white-color"
White isNil ifTrue:[
- White := self redPercent:100 greenPercent:100 bluePercent:100.
+ White := self redPercent:100 greenPercent:100 bluePercent:100.
].
^ White
+
+ "
+ Color white inspect
+ "
!
yellow
"return the yellow color - ST-80 compatibility"
- ^ self yellow:100
+ Yellow isNil ifTrue:[
+ Yellow := self redPercent:100 greenPercent:100 bluePercent:0.
+ ].
+ ^ Yellow
+
+ "
+ Color yellow inspect
+ "
"Modified: 23.4.1996 / 13:33:56 / cg"
!