nscolor

Is there a conventional method for inverting NSColor values?

I'm looking for a way to invert arbitrary NSColor values at runtime, and there doesn't appear to be any built-in method to do so. I will be using a category to extend NSColor as follows: NSColor * invertedColor = [someOtherColor inverted]; Here is the category method prototype that I am using: @implementation NSColor (MyCategories) ...

NSColorWell doesn't open when bound with ValueTransformer

I have an NSColorWell, which is bound to a property that contains an NSString instance, which get's transformed into an NSColor through my ColorTransformer (NSValueTransformer). It essentially transforms something like #FF0000 into an NSColor. This works as expected, but the ColorWell no longer opens it's Pane when clicked. When I disabl...

NSColor transparency on black background?

In the background of my view, I draw a light blue color. And in the middle, i have a square box that is supposed to have an even lighter gray in it that has a 20% transparency. But for some reason the transparency is on top of a black background instead of a blue. I'm sorry If i'm not being clear. ...

Are NSColors like tungsten and steel also available?

I know Cocoa gives you whiteColor, blackColor, darkGrayColor, but do they also have the colors from in Apple's color panel? With colors like "Snow", "Tungsten", "Steel", "Tin" ? Or should I create those myself? ...

Popup NSColorPanel?

Hi, Is it possible to make an NSColorPanel 'Pop Up', almost like a popup menu, from the NSColorWell? I don't like how it's implemented as a palette, as it's sometimes not obvious which NSColorWell it's associated with. Thanks! MT ...

Is there any method in Cocoa that helps iterating through all NSColor values(R,G,B only, alpha not touched)?

I need a function that for a given R,G,B values returns the next color. By saying the next color I mean the color which one of the components change by 1(assuming that R,G,B values are of range 0-255). It has to be constructed that way that starting from the white color(or black alternatively) you can iterate throught all of the colors...

NSView Not updating?

Hello, Im working on a drag n' drop view and found some handlers for drag and drop actions on the web. I want to make it so it turns blue when the user drags a file over the drag and drop area and gray again when they exit the drag and drop area. The issues is its not updating when you drag your mouse over it or exit it. Heres some of t...