'From Squeak2.8 of 13 June 2000 [latest update: #2359] on 24 November 2000 at 4:07:05 pm'! "Change Set: PrettyPrintColorTweak-dew Date: 24 November 2000 Author: Doug Way A couple of tweaks to make the default pretty printing colors a bit less bright, so that they're more readable over the long term."! !Color methodsFor: 'transformations' stamp: 'dew 11/20/2000 23:42'! duller "Return a duller shade of the same color." ^ Color h: self hue s: (self saturation - 0.3 max: 0.0) v: self brightness! ! !Color class methodsFor: 'named colors' stamp: 'dew 11/24/2000 16:02'! darkGreen ^ Color r: 0.0 g: 0.6 b: 0.0! ! !Color class methodsFor: 'named colors' stamp: 'dew 11/21/2000 00:59'! purple ^ Color r: 0.6 g: 0.0 b: 0.6! ! !Preferences class methodsFor: 'pretty-printing' stamp: 'dew 11/22/2000 00:06'! initializeSyntaxColorsAndStyles | specs | "To change the color choices, you can simply edit this method, and then evaluate the following line: Preferences initializeSyntaxColorsAndStyles Later, people may wish to produce interactive editors for modifying the choices" SyntaxColorsAndStyles _ IdentityDictionary new. # ( (temporaryVariable (darkGreen bold)) (methodArgument (darkGreen italic)) (blockArgument (darkGreen italic)) (comment (red normal)) (variable (blue bold)) (literal (brown normal)) (keyword (black normal))) do: [:nameAndSpecs | specs _ nameAndSpecs second. SyntaxColorsAndStyles at: nameAndSpecs first put: (SyntaxAttribute color: (Color perform: specs first) darker duller emphasis: specs last)] ! ! "Postscript:" Preferences initializeSyntaxColorsAndStyles. !