--- a/Color.st Tue Nov 27 19:03:42 2012 +0100
+++ b/Color.st Tue Dec 11 16:06:34 2012 +0100
@@ -5028,6 +5028,12 @@
"Modified: 10.2.1997 / 22:08:14 / cg"
!
+contrastingBlackOrWhite
+ "answer either black or white, whichever gives a better contrast"
+
+ ^ self brightness < 0.65 ifTrue:[self class white] ifFalse:[self class black]
+!
+
darkened
"return a new color, which is slightly darker than the receiver"
@@ -5550,11 +5556,11 @@
!Color class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.223 2012-11-24 12:54:33 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.224 2012-12-11 15:06:34 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.223 2012-11-24 12:54:33 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.224 2012-12-11 15:06:34 stefan Exp $'
! !
Color initialize!