Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSColorSpaceMBS class.

NSColorSpaceMBS.adobeRGB1998ColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing an Adobe RGB (1998) color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.adobeRGB1998ColorSpace
MsgBox n.localizedName

The NSColorSpace object. This color-additive color space has red, green, blue, and alpha components.

The Adobe RGB (1998) color space was designed to encompass most of the colors achievable on CMYK color printers, but by using RGB primary colors on a device such as the computer display. For more information on this color space, go to this website:

http://www.adobe.com/digitalimag/adobergb.html

Some examples using this method:

NSColorSpaceMBS.availableColorSpacesWithModel(Model as Integer) as NSColorSpaceMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the list of color spaces available on the system that are displayed in the color panel, in the order they are displayed in the color panel.
Example
dim a(-1) as NSColorSpaceMBS
dim m as Integer = NSColorSpaceMBS.NSRGBColorSpaceModel

a = NSColorSpaceMBS.availableColorSpacesWithModel(m)

dim names(-1) As string

for each c as NSColorSpaceMBS in a
names.Append c.localizedName
next

MsgBox Join(names,EndOfLine)

This method doesn't return color spaces created on the fly or spaces without user-displayable names. Pass NSUnknownColorSpaceModel as model to get all available color spaces.

Available in Mac OS X v10.6 and later.

NSColorSpaceMBS.colorSpaceForColorSpaceName(name as string) as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The colorspace for this color space name.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.colorSpaceForColorSpaceName(NSColorSpaceMBS.NSDeviceWhiteColorSpace)
MsgBox n.localizedName

This plugin function uses an undocumented method from Apple's AppKit framework. Seems like they use it only internally.

Works well on Mac OS X 10.6.

NSColorSpaceMBS.ColorSpaceWithCGColorSpace(CGColorSpaceHandle as Integer) as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 13.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Initializes and returns an NSColorSpace object initialized from a Core Graphics color-space object.

The initialized NSColorSpace object or nil if initialization was not successful, which might happen if the color space represented by the CGColorSpace object is not supported by NSColorSpace.

Because NSColorSpace might retain or copy the CGColorSpace object depending on circumstances, you should not assume pointer equality of the provided object with that returned by CGColorSpace. And even if the pointer equality is preserved during runtime, it may not be after the NSColorSpace object is archived and unarchived.

Available in Mac OS X version 10.5 and later.

NSColorSpaceMBS.ColorSpaceWithColorSyncProfile(ColorSyncProfileHandle as Integer) as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 13.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Initializes and returns an NSColorSpace object given a ColorSync profile.

The initialized NSColorSpace object or nil if initialization was not successful.

Available in Mac OS X v10.4 and later.

NSColorSpaceMBS.ColorSpaceWithICCProfileData(File as FolderItem) as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 13.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Initializes and returns an NSColorSpace object given an ICC profile.

file: The path to the ICC profile to use when initializing the NSColorSpace object. For information on ICC profiles, see the latest ICC specification at the International Color Consortium website.

Returns the initialized NSColorSpace object or nil if initialization was not successful.
Available in Mac OS X v10.4 and later.

See also:

Some examples using this method:

NSColorSpaceMBS.ColorSpaceWithICCProfileData(ICCProfileData as Memoryblock) as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 13.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Initializes and returns an NSColorSpace object given an ICC profile.

ICCProfileData:
The ICC profile to use when initializing the NSColorSpace object. For information on ICC profiles, see the latest ICC specification at the International Color Consortium website.

Returns the initialized NSColorSpace object or nil if initialization was not successful.
Available in Mac OS X v10.4 and later.

See also:

NSColorSpaceMBS.deviceCMYKColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a calibrated or device-dependent CMYK color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.deviceCMYKColorSpace
MsgBox n.localizedName

The NSColorSpace object. This color space has cyan, magenta, yellow, black, and alpha components. Typical devices that use the color-subtractive CMYK color space are color printers. This object corresponds to the Cocoa color space name NSDeviceCMYKColorSpace.

Available in Mac OS X v10.4 and later.

NSColorSpaceMBS.deviceGrayColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a calibrated or device-dependent gray color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.deviceGrayColorSpace
MsgBox n.localizedName

The NSColorSpace object. The color space also includes an alpha component. Typical devices that use this color space are grayscale printers and displays. This object corresponds to the Cocoa color space name NSDeviceWhiteColorSpace.

Available in Mac OS X v10.4 and later.

NSColorSpaceMBS.deviceRGBColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a calibrated or device-dependent RGB color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.deviceRGBColorSpace
MsgBox n.localizedName

The NSColorSpace object. This color space has red, green, blue, and alpha components. Typical devices that use the color-additive RGB color space are displays and scanners. This object corresponds to the Cocoa color space name NSDeviceRGBColorSpace.

Some examples using this method:

NSColorSpaceMBS.genericCMYKColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a device-independent CMYK color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericCMYKColorSpace
MsgBox n.localizedName

The NSColorSpace object. This color space has cyan, magenta, yellow, black and alpha component.

Available in Mac OS X v10.4 and later.

NSColorSpaceMBS.genericGamma22GrayColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a gray color space with a gamma value of 2.2.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericGamma22GrayColorSpace
MsgBox n.localizedName

Available in Mac OS X v10.6 and later.

NSColorSpaceMBS.genericGrayColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a device-independent gray color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericGrayColorSpace
MsgBox n.localizedName

The NSColorSpace object. The color space also includes an alpha component. This object corresponds to the Cocoa color space name NSCalibratedWhiteColorSpace.

Available in Mac OS X v10.4 and later.

NSColorSpaceMBS.genericRGBColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing a device-independent RGB color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericRGBColorSpace
MsgBox n.localizedName

The NSColorSpace object. This color-additive color space has red, green, blue, and alpha components. This object corresponds to the Cocoa color space name NSCalibratedRGBColorSpace.

Available in Mac OS X v10.4 and later.

Some examples using this method:

NSColorSpaceMBS.sRGBColorSpace as NSColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Drawing MBS MacBase Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns an NSColorSpace object representing an sRGB color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.sRGBColorSpace
MsgBox n.localizedName

The NSColorSpace object. This color-additive color space has red, green, blue, and alpha components.

The sRGB color space is a standard color space for use on monitors, printers, and the Internet. For further information on sRGB, see this website:

http://www.color.org/srgb.html

Available in Mac OS X version 10.5.

Some examples using this method:

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...