'From Cuis 1.0 of 6 March 2009 [latest update: #5989] on 23 March 2009 at 7:58:26 pm'!
!classDefinition: #Color category: #'Graphics-Primitives'!
Object subclass: #Color
	instanceVariableNames: 'rgb cachedDepth cachedBitPattern '
	classVariableNames: 'Black Blue BlueShift Brown CachedColormaps ColorChart ColorNames ComponentMask ComponentMax Cyan DarkGray Gray GrayToIndexMap Green GreenShift HalfComponentMask HighLightBitmaps IndexedColors LightBlue LightBrown LightCyan LightGray LightGreen LightMagenta LightOrange LightRed LightYellow Magenta MaskingMap Orange PaleBlue PaleBuff PaleGreen PaleMagenta PaleOrange PalePeach PaleRed PaleTan PaleYellow PureBlue PureCyan PureGreen PureMagenta PureRed PureYellow RandomStream Red RedShift TranslucentPatterns Transparent VeryDarkGray VeryLightGray VeryPaleRed VeryVeryDarkGray VeryVeryLightGray White Yellow '
	poolDictionaries: ''
	category: 'Graphics-Primitives'!

!Color class methodsFor: 'class initialization' stamp: 'di 1/6/1999 17:44'!
initializeNames
	"Name some colors."
	"Color initializeNames"

	ColorNames _ OrderedCollection new.
	self named: #black put: (Color r: 0 g: 0 b: 0).
	self named: #veryVeryDarkGray put: (Color r: 0.125 g: 0.125 b: 0.125).
	self named: #veryDarkGray put: (Color r: 0.25 g: 0.25 b: 0.25).
	self named: #darkGray put: (Color r: 0.375 g: 0.375 b: 0.375).
	self named: #gray put: (Color r: 0.5 g: 0.5 b: 0.5).
	self named: #lightGray put: (Color r: 0.625 g: 0.625 b: 0.625).
	self named: #veryLightGray put: (Color r: 0.75 g: 0.75 b: 0.75).
	self named: #veryVeryLightGray put: (Color r: 0.875 g: 0.875 b: 0.875).
	self named: #white put: (Color r: 1.0 g: 1.0 b: 1.0).
	self named: #red put: (Color r: 1.0 g: 0 b: 0).
	self named: #yellow put: (Color r: 1.0 g: 1.0 b: 0).
	self named: #green put: (Color r: 0 g: 1.0 b: 0).
	self named: #cyan put: (Color r: 0 g: 1.0 b: 1.0).
	self named: #blue put: (Color r: 0 g: 0 b: 1.0).
	self named: #magenta put: (Color r: 1.0 g: 0 b: 1.0).
	self named: #brown put: (Color r: 0.6 g: 0.2 b: 0).
	self named: #orange put: (Color r: 1.0 g: 0.6 b: 0).
	self named: #lightRed put: (Color r: 1.0 g: 0.8 b: 0.8).
	self named: #lightYellow put: (Color r: 1.0 g: 1.0 b: 0.8).
	self named: #lightGreen put: (Color r: 0.8 g: 1.0 b: 0.6).
	self named: #lightCyan put: (Color r: 0.4 g: 1.0 b: 1.0).
	self named: #lightBlue put: (Color r: 0.8 g: 1.0 b: 1.0).
	self named: #lightMagenta put: (Color r: 1.0 g: 0.8 b: 1.0).
	self named: #lightBrown put: (Color r: 1.0 g: 0.6 b: 0.2).
	self named: #lightOrange put: (Color r: 1.0 g: 0.8 b: 0.4).
	self named: #transparent put: (TranslucentColor new alpha: 0.0).
! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:06'!
paleBlue
	^(Color r: 0.87 g: 0.976 b: 0.995)
! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:07'!
paleBuff
	^(Color r: 0.995 g: 0.979 b: 0.921)! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:06'!
paleGreen
	^(Color r: 0.874 g: 1.0 b: 0.835)! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:05'!
paleMagenta
	^(Color r: 1.0 g: 0.901 b: 1.0)! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:03'!
paleOrange
	^ (Color r: 0.991 g: 0.929 b: 0.843)
! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:03'!
palePeach
	^(Color r: 1.0 g: 0.929 b: 0.835)! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:07'!
paleRed
	^(Color r: 1.0 g: 0.901 b: 0.901)! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:02'!
paleTan
	^(Color r: 0.921 g: 0.878 b: 0.78)
! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:05'!
paleYellow
	^(Color r: 1.0 g: 1.0 b: 0.85)! !

!Color class methodsFor: 'named colors' stamp: 'yo 8/28/2008 01:06'!
veryPaleRed
	^(Color r: 1.0 g: 0.948 b: 0.948)! !


!Integer methodsFor: 'bit manipulation' stamp: 'jmv 3/23/2009 19:57'!
>> shiftAmount  "shift to the right"
	shiftAmount < 0 ifTrue: [self error: 'negative arg'].
	^ self bitShift: 0 - shiftAmount! !

!classDefinition: #Color category: #'Graphics-Primitives'!
Object subclass: #Color
	instanceVariableNames: 'rgb cachedDepth cachedBitPattern'
	classVariableNames: 'Black Blue BlueShift Brown CachedColormaps ColorChart ColorNames ComponentMask ComponentMax Cyan DarkGray Gray GrayToIndexMap Green GreenShift HalfComponentMask HighLightBitmaps IndexedColors LightBlue LightBrown LightCyan LightGray LightGreen LightMagenta LightOrange LightRed LightYellow Magenta MaskingMap Orange PureBlue PureCyan PureGreen PureMagenta PureRed PureYellow RandomStream Red RedShift TranslucentPatterns Transparent VeryDarkGray VeryLightGray VeryVeryDarkGray VeryVeryLightGray White Yellow'
	poolDictionaries: ''
	category: 'Graphics-Primitives'!
