MonobjcMonobjc Documented Class Library
ColorWithColorSpaceComponentsCount Method (space, components, numberOfComponents)
NamespacesMonobjc.AppKitNSColorColorWithColorSpaceComponentsCount(NSColorSpace, IntPtr, NSInteger)

Returns an NSColor object created from the specified components of the given color space.

Original signature is '+ (NSColor *)colorWithColorSpace:(NSColorSpace *)space components:(const CGFloat *)components count:(NSInteger)numberOfComponents'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSColor ColorWithColorSpaceComponentsCount(
	NSColorSpace space,
	IntPtr components,
	NSInteger numberOfComponents
)
Public Shared Function ColorWithColorSpaceComponentsCount ( _
	space As NSColorSpace, _
	components As IntPtr, _
	numberOfComponents As NSInteger _
) As NSColor
public:
static NSColor^ ColorWithColorSpaceComponentsCount(
	NSColorSpace^ space, 
	IntPtr components, 
	NSInteger numberOfComponents
)
Parameters
space (NSColorSpace)
An NSColorSpace object representing a color space. The method raises if this is nil.
components (IntPtr)
An array of the components in the specified color space to use to create the NSColor object. The order of these components is determined by the color-space profile, with the alpha component always last. (If you want the created color to be opaque, specify 1.0 for the alpha component.)
numberOfComponents (NSInteger)
The number of components in the components array. This should match the number dictated by the specified color space plus one for alpha. This method raises an exception if they do not match.
Return Value
The color object. If space represents a color space that cannot cannot be used with NSColor objects—for example, a “pattern” color space—the method returns nil.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)