I noticed that the little circle tracking the picked up color was misaligned on grayscale. I changed the hue value from 0.0 to 240.0 and it works better.
Karl
'From etoys2.2 of 22 September 2007 [latest update: #1737] on 30 October 2007 at 11:09:29 pm'!
!ColorPickerMorph methodsFor: 'private' stamp: 'kfr 10/30/2007 23:09'! positionOfColor: aColor "Compute the position of the given color in the color chart form" | rgbRect x y h s v | rgbRect _ (0@0 extent: originalForm boundingBox extent) insetBy: (1@ Color colorPaletteCaptionHeight corner: Color colorPaletteGrayWidth + 1 @1). h _ aColor hue. s _ aColor saturation. v _ aColor brightness. h = 240.0 ifTrue:["gray" ^(rgbRect right + (Color colorPaletteGrayWidth // 2)) @ (rgbRect height * (1.0 - v) + rgbRect top)]. x _ (h + 22 \ 360 / 360.0 * rgbRect width) rounded. y _ 0.5. s < 1.0 ifTrue:[y _ y - (1.0 - s * 0.5)]. v < 1.0 ifTrue:[y _ y + (1.0 - v * 0.5)]. y _ (y * rgbRect height) rounded. ^x@y + (1 @ Color colorPaletteCaptionHeight)! !
Karl,
I noticed that the little circle tracking the picked up color was misaligned on grayscale. I changed the hue value from 0.0 to 240.0 and it works better.
I couldn't quite figure out how to illustrate the problem best. I put a ColorChart on Display and open a color picker (so you have two rainbow chart on screen) and tracking seems to be ok.
-- Yoshiki
Yoshiki Ohshima wrote:
Karl,
I noticed that the little circle tracking the picked up color was misaligned on grayscale. I changed the hue value from 0.0 to 240.0 and it works better.
I couldn't quite figure out how to illustrate the problem best. I put a ColorChart on Display and open a color picker (so you have two rainbow chart on screen) and tracking seems to be ok.
-- Yoshiki
Ok, I found out what is happening. It seems to be dependent on display depth. In 16 bit depth it works fine with 0.0 and 240.0 in 32 bit depth.
Karl
etoys-dev@lists.squeakfoundation.org