Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGColorSpaceMBS class.

CGColorSpaceMBS.CreateCalibratedGray(whitePoint() as Double, blackPoint() as Double, gamma as Double) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a calibrated gray colorspace.

WhitePoint is an array of 3 numbers (type double) specifying the tristimulus value, in the CIE 1931 XYZ-space, of the diffuse white point.
BlackPoint is an array of 3 numbers (type double) specifying the tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
Gamma defines the gamma for the gray component.
Returns nil on any error.

CGColorSpaceMBS.CreateCalibratedRGB(whitePoint() as Double, blackPoint() as Double, gamma() as Double, matrix() as Double) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a calibrated RGB colorspace.

WhitePoint is an array of 3 numbers (type double) specifying the tristimulus value, in the CIE 1931 XYZ-space, of the diffuse white point.
BlackPoint is an array of 3 numbers (type double) specifying the tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
Gamma is an array of 3 numbers (type double) specifying the gamma for the red, green, and blue components of the color space.
Matrix is an array of 9 numbers (type double) specifying the linear interpretation of the gamma-modified RGB values of the colorspace with respect to the final XYZ representation.
Returns nil on any error.

CGColorSpaceMBS.CreateDeviceCMYK as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a DeviceCMYK colorspace.

Returns nil on any error.

CGColorSpaceMBS.CreateDeviceGray as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a DeviceGray colorspace.

Returns nil on any error.

CGColorSpaceMBS.CreateDeviceRGB as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a DeviceRGB colorspace.

Returns nil on any error.

Old name: CGColorSpaceCreateDeviceRGBMBS

CGColorSpaceMBS.CreateLab(whitePoint() as Double, blackPoint() as Double, range() as Double) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an L*a*b* colorspace.

WhitePoint is an array of 3 numbers (type double) specifying the tristimulus value, in the CIE 1931 XYZ-space, of the diffuse white point.
BlackPoint is an array of 3 numbers (type double) specifying the tristimulus value, in CIE 1931 XYZ-space, of the diffuse black point.
Range is an array of four numbers (type double) specifying the range of valid values for the a* and b* components of the color space.
Returns nil on any error.

CGColorSpaceMBS.CreatePattern(baseSpace as CGColorSpaceMBS) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a pattern colorspace.

BaseSpace is the underlying colorspace of the pattern colorspace. For colored patterns, baseSpace should be nil; for uncolored patterns, baseSpace specifies the colorspace of colors which will be painted through the pattern.

Returns nil on any error.

CGColorSpaceMBS.CreateWithHandle(Handle as Integer) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 15.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a CGColorSpace for a handle.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericCMYKColorSpace
dim c as CGColorSpaceMBS = CGColorSpaceMBS.CreateWithHandle(n.CGColorSpaceHandle)
MsgBox c.Name

Sometimes you need to create CGColorSpaceMBS from NSColorSpaceMBS or some handle you got from an OS function and than you can use this function.
Returns nil on any error. Retains the handle.

CGColorSpaceMBS.CreateWithICCProfile(ICCProfileData as memoryblock) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an ICC-based color space using the ICC profile contained in the specified data.

data: The data containing the ICC profile to set for the new color space.
Returns a new color space based on the specified profile.

See also:

Some examples using this method:

CGColorSpaceMBS.CreateWithICCProfile(ICCProfileData as string) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 13.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an ICC-based color space using the ICC profile contained in the specified data.

data: The data containing the ICC profile to set for the new color space.
Returns a new color space based on the specified profile.

See also:

CGColorSpaceMBS.CreateWithName(name as string) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Create a color space using name as the identifier for the color space.

Pass one of the kCGColorSpace* string constants.

CGColorSpaceMBS.CreateWithPlatformColorSpace(Handle as Integer) as CGColorSpaceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a CGColorSpace using a Colorsync Profile Handle.

Returns nil on any error.

CGColorSpaceMBS.kCGColorSpaceACESCGLinear as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the ACEScg color space. For more information, see “ACEScg — A Working Space for CGI Render and Compositing”, Version 1.0.1, Academy of Motion Picture Arts and Sciences (http://www.oscars.org/science-technology/sci-tech-projects/aces).

Available in OS X v10.11 and later.

CGColorSpaceMBS.kCGColorSpaceAdobeRGB1998 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the Adobe RGB (1998) color space. For more information, see "Adobe RGB (1998) Color Image Encoding", Version 2005-05, Adobe Systems Inc. (http://www.adobe.com).

Some examples using this method:

CGColorSpaceMBS.kCGColorSpaceDCIP3 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the DCI P3 color space, created by Digital Cinema Initiatives, LLC. This color space is the digital cinema standard.

Available in OS X v10.11 and later.

CGColorSpaceMBS.kCGColorSpaceDisplayP3 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the Display P3 color space, created by Apple Inc. This color space uses the DCI P3 primaries, a D65 white point, and the same gamma curve as the sRGB color space.

Available in OS X v10.10 and later.

CGColorSpaceMBS.kCGColorSpaceGenericCMYK as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the "Generic" CMYK color space.

Some examples using this method:

CGColorSpaceMBS.kCGColorSpaceGenericGray as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the "Generic" gray color space.

Some examples using this method:

CGColorSpaceMBS.kCGColorSpaceGenericGrayGamma2_2 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the generic gray color space with a gamma value of 2.2.

Available in OS X v10.6 and later.

CGColorSpaceMBS.kCGColorSpaceGenericRGB as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the "Generic" RGB color space.

Some examples using this method:

CGColorSpaceMBS.kCGColorSpaceGenericRGBLinear as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the "Generic" linear RGB color space. This is the same as kCGColorSpaceGenericRGB but with a 1.0 gamma.

Some examples using this method:

CGColorSpaceMBS.kCGColorSpaceGenericXYZ as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the generic XYZ color space.

Available in OS X v10.11 and later.

CGColorSpaceMBS.kCGColorSpaceITUR_2020 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the ITU-R Recommendation BT.2020 color space. For more information, see “BT.2020 : Parameter values for ultra-high definition television systems for production and international programme exchange”, Version 2014-06, International Telecommunication Union (https://www.itu.int/rec/R-REC-BT.2020).

Available in OS X v10.11 and later.

CGColorSpaceMBS.kCGColorSpaceITUR_709 as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the ITU-R Recommendation BT.2020 color space. For more information, see “BT.2020 : Parameter values for ultra-high definition television systems for production and international programme exchange”, Version 2014-06, International Telecommunication Union (https://www.itu.int/rec/R-REC-BT.2020).

Available in OS X v10.11 and later.

CGColorSpaceMBS.kCGColorSpaceROMMRGB as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 16.0 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the ROMM RGB color space. For more information, see “Reference Output Medium Metric RGB Color Space (ROMM RGB) White Paper”, Version 2.1, Eastman Kodak Company (http://www.kodak.com/global/plugins/acrobat/en/professional/products/software/colorFlow/romm_rgb.pdf).

Available in OS X v10.11 and later.

CGColorSpaceMBS.kCGColorSpaceSRGB as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method CoreGraphics MBS MacCG Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the names for color spaces.

The name of the sRGB color space. The capitalization in the name, while strictly inaccurate, avoids interpretational ambiguity. For more information, see IEC 61966-2-1 (1999-10): "Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB".

Some examples using this method:

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


💬 Ask a question or report a problem
The biggest plugin in space...