Creating a Color Meter Using Cocoa
Subject:   Color wheel...
Date:   2001-06-20 19:28:20
From:   johnts
Response to: Color wheel...

Hmm. Here's mine. It's pretty much the same thing:

- (IBAction)setAll:(id)sender
NSColor *theColor = [[sender color] colorUsingColorSpaceName:@"NSDeviceRGBColorSpace"];

blueValue = [theColor blueComponent];
redValue = [theColor redComponent];
greenValue = [theColor greenComponent];
alphaValue = [theColor alphaComponent];

[alphaField setFloatValue:alphaValue];
[alphaSlider setFloatValue:alphaValue];

[blueField setFloatValue:blueValue];
[blueSlider setFloatValue:blueValue];

[greenField setFloatValue:greenValue];
[greenSlider setFloatValue:greenValue];

[redField setFloatValue:redValue];
[redSlider setFloatValue:redValue];


But the sliders don't move.