Platforms to show: All Mac Windows Linux Cross-Platform
NSColorSpaceMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
You can make custom color spaces from ColorSync profiles or from ICC profiles. NSColorSpace also has factory methods that return objects representing the system color spaces.
- 7 properties
- property colorSpaceModel as Integer
- property colorSpaceName as string
- property description as string
- property File as FolderItem
- property Handle as Integer
- property localizedName as string
- property numberOfColorComponents as Integer
- 6 methods
- method CGColorSpaceHandle as Integer
- method colorSyncProfileHandle as Integer
- method Constructor(ICCProfileData as Memoryblock)
- method ICCProfileData as Memoryblock
- method initWithCGColorSpace(CGColorSpaceHandle as Integer)
- method initWithColorSyncProfile(ColorSyncProfileHandle as Integer)
- 15 shared methods
- shared method adobeRGB1998ColorSpace as NSColorSpaceMBS
- shared method availableColorSpacesWithModel(Model as Integer) as NSColorSpaceMBS()
- shared method colorSpaceForColorSpaceName(name as string) as NSColorSpaceMBS
- shared method ColorSpaceWithCGColorSpace(CGColorSpaceHandle as Integer) as NSColorSpaceMBS
- shared method ColorSpaceWithColorSyncProfile(ColorSyncProfileHandle as Integer) as NSColorSpaceMBS
- shared method ColorSpaceWithICCProfileData(File as FolderItem) as NSColorSpaceMBS
- shared method ColorSpaceWithICCProfileData(ICCProfileData as Memoryblock) as NSColorSpaceMBS
- shared method deviceCMYKColorSpace as NSColorSpaceMBS
- shared method deviceGrayColorSpace as NSColorSpaceMBS
- shared method deviceRGBColorSpace as NSColorSpaceMBS
- shared method genericCMYKColorSpace as NSColorSpaceMBS
- shared method genericGamma22GrayColorSpace as NSColorSpaceMBS
- shared method genericGrayColorSpace as NSColorSpaceMBS
- shared method genericRGBColorSpace as NSColorSpaceMBS
- shared method sRGBColorSpace as NSColorSpaceMBS
- 18 constants
Constants
Constant | Value | Description |
---|---|---|
NSCalibratedBlackColorSpace | "NSCalibratedBlackColorSpace" |
Calibrated color space with black and alpha components (pure black is 1.0)
Deprecated in Mac OS X v10.6. Example |
NSCalibratedRGBColorSpace | "NSCalibratedRGBColorSpace" |
Calibrated color space with red, green, blue, and alpha components.
You can also create a color with HSB (hue, saturation, brightness) and alpha components and can extract these components. Example |
NSCalibratedWhiteColorSpace | "NSCalibratedWhiteColorSpace" | Calibrated color space with white and alpha components (pure white is 1.0) Example |
NSCMYKColorSpaceModel | 2 |
The CYMK (cyan, yellow, magenta, black) color-space model.
Can refer to both device-dependent and generic color space variants. Available in Mac OS X v10.4 and later. Example |
NSCustomColorSpace | "NSCustomColorSpace" |
Custom NSColorSpace object and floating-point components describing a color in that space.
A custom color-space object represents a color space that is not necessarily predefined by the Application Kit. See "Working With Color Spaces" for information on creating custom color-space objects. |
NSDeviceBlackColorSpace | "NSDeviceBlackColorSpace" | Device-dependent color space with black and alpha components (pure black is 1.0) Example |
NSDeviceCMYKColorSpace | "NSDeviceCMYKColorSpace" | Device-dependent color space with cyan, magenta, yellow, black, and alpha components. Example |
NSDeviceNColorSpaceModel | 4 |
DeviceN is a color-space model from Adobe Systems, Inc. used in PostScript and PDF color specification.
Available in Mac OS X v10.4 and later. Example |
NSDeviceRGBColorSpace | "NSDeviceRGBColorSpace" |
Device-dependent color space with red, green, blue, and alpha components.
You can also create a color with HSB (hue, saturation, brightness) and alpha components and can extract these components. Example |
NSDeviceWhiteColorSpace | "NSDeviceWhiteColorSpace" | Device-dependent color space with white and alpha components (pure white is 1.0) Example |
NSGrayColorSpaceModel | 0 |
The grayscale color-space model. Can refer to both device-dependent and generic color space variants.
Available in Mac OS X v10.4 and later. Example |
NSIndexedColorSpaceModel | 5 |
An indexed color space, which identifies specified discrete colors in a color list by index number.
An indexed color value (a color specification in indexed color space) consists of an index value that refers to a color in a color list. Available in Mac OS X version 10.5 and later. Example |
NSLABColorSpaceModel | 3 |
The L*a*b* device-independent color-space model, which represents colors relative to a reference white point.
Available in Mac OS X v10.4 and later. Example |
NSNamedColorSpace | "NSNamedColorSpace" |
Catalog name and color name components.
The components of this color space are indexes into lists or catalogs of prepared colors. The catalogs of named colors come with lookup tables that are able to generate the correct color on a given device. |
NSPatternColorSpace | "NSPatternColorSpace" |
Pattern image (tiled)
Identifies a pattern color space, which is simply an image that is repeated over and over again in a tiled pattern. |
NSPatternColorSpaceModel | 6 |
Identifies a pattern color space, which is simply an image that is repeated over and over again in a tiled pattern.
Available in Mac OS X version 10.5 and later. Example |
NSRGBColorSpaceModel | 1 |
The RGB (red green blue) color-space model.
Can refer to both device-dependent and generic color space variants. Available in Mac OS X v10.4 and later. Example |
NSUnknownColorSpaceModel | -1 |
This model is not known to NSColorSpace.
Available in Mac OS X v10.4 and later. |
This class has no sub classes.
Some methods using this class:
- NSBitmapImageRepMBS.bitmapImageRepByConvertingToColorSpace(colorSpace as NSColorSpaceMBS, renderingIntent as Integer) as NSBitmapImageRepMBS
- NSBitmapImageRepMBS.bitmapImageRepByRetaggingWithColorSpace(newSpace as NSColorSpaceMBS) as NSBitmapImageRepMBS
- NSColorMBS.colorSpace as NSColorSpaceMBS
- NSColorMBS.colorUsingColorSpace(colorSpace as NSColorSpaceMBS) as NSColorMBS
- NSColorMBS.colorWithColorSpace(ColorSpace as NSColorSpaceMBS, components() as Double) as NSColorMBS
- NSColorMBS.colorWithColorSpace(ColorSpace as NSColorSpaceMBS, paramarray components as Double) as NSColorMBS
- NSColorMBS.colorWithColorSpaceHSV(ColorSpace as NSColorSpaceMBS, hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
Some properties using for this class:
- NSBitmapImageRepMBS.colorSpace as NSColorSpaceMBS
- NSWindowMBS.colorSpace as NSColorSpaceMBS
Some examples using this class:
- /DynaPDF/Raster/RenderPageToImage with color management
- /DynaPDF/Raster/RenderPDFFile Test with Color Management
- /Images/JPEG/JPEG with LCMS/JPEG with LCMS
- /Images/LCMS2/Drawing on Mac with Colorspaces/Drawing on Mac with Colorspaces
- /MacBase/ConvertToSRGB
- /MacBase/NSScreen
- /MacCG/Mac ColorSpace tests
- /MacCocoa/NSColor and Colorspaces
- /MacCocoa/Window Colorspace
- /MacControls/Draw full red on screen
Blog Entries
- MBS Xojo Plugins, version 24.0pr6
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1
- MBS Xojo Plugins, version 19.1pr2
- MBS Xojo Plugins, version 18.5pr3
- Colorspaces in MacOS with Xojo
- MBS Xojo / Real Studio plug-ins in version 13.4
- MBS Xojo / Real Studio Plugins, version 13.4pr3
- Plugin merge/split
- MonkeyBread Software Releases the MBS REALbasic plug-ins 8.6
Release notes
- Version 24.0
- Fixed a problem with file property in NSColorSpaceMBS class not working.
- Version 19.1
- Added work around to NSColorSpaceMBS.File property to make it work better.
- Version 18.5
- Added NSColorSpaceMBS.File property.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSColorSamplerMBS - NSComboBoxMBS