Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSColorMBS class.
NSColorMBS.alternateSelectedControlColor as NSColorMBS
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 |
The system color used for the face of a selected control—a control being clicked or dragged. This color can be used where iApp-like highlighting is desired.
NSColorMBS.alternateSelectedControlTextColor as NSColorMBS
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 |
The system color used for text in a selected control—a control being clicked or dragged. This color can be used where iApp-like highlighting is desired.
NSColorMBS.alternatingContentBackgroundColors as NSColorMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Available on MacOS 10.14 or newer.
This function calls controlAlternatingRowBackgroundColors when alternatingContentBackgroundColors is not available.
Some examples using this method:
NSColorMBS.blackColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSColorMBS.blueColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSColorMBS.brownColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Var c as NSColorMBS = NSColorMBS.brownColor
window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue
Some examples using this method:
NSColorMBS.clearColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSColorMBS.colorFromPasteboard as NSColorMBS
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 color currently on the pasteboard or nil if pasteBoard doesn't contain color data.
NSColorMBS.colorNamed(colorName as String) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSColorMBS.colorWithCalibratedHSV(hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
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 |
hue: The hue component of the color object in the HSB color space.
saturation: The saturation component of the color object in the HSB color space.
brightness: The brightness (or value) component of the color object in the HSB color space.
alpha: The opacity value of the color object,
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
NSColorMBS.colorWithCalibratedRGB(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 9.8 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
red: The red component of the color object.
green: The green component of the color object.
blue: The blue component of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
Some examples using this method:
- /Mac64bit/SceneKit/Triangle Demo
- /MacCocoa/NSColor and Colorspaces
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Database with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Simple Demo with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListboxTV with ContainerControl Cells
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Hierarchical & Flat/ListBoxTV OutlineView
- /MacFrameworks/IKImageBrowser/IKImageBrowser Groups
- /MacFrameworks/IKImageBrowser/IKImageBrowser Scroll
- /MacFrameworks/MapKit/MapKit Test
NSColorMBS.colorWithCalibratedWhite(white as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 9.8 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
white: The grayscale value of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
NSColorMBS.colorWithCatalogName(listName as String, colorName as String) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSColorMBS.colorWithCGColor(CGColorHandle as Integer) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Return value may be an approximation in some cases, so there isn't guaranteed round-trip fidelity.
Available on Mac OS X 10.8.
NSColorMBS.colorWithColorSpace(ColorSpace as NSColorSpaceMBS, components() as Double) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
space: An NSColorSpace object representing a color space. The method raises an exception if this is nil.
components: 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.)
Returns 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.
Raises an NSExceptionMBS if the number of components does not match.
See also:
Some examples using this method:
NSColorMBS.colorWithColorSpace(ColorSpace as NSColorSpaceMBS, paramarray components as Double) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 15.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
space: An NSColorSpace object representing a color space. The method raises an exception if this is nil.
components: 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.)
Returns 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.
Raises an NSExceptionMBS if the number of components does not match.
See also:
NSColorMBS.colorWithColorSpaceHSV(ColorSpace as NSColorSpaceMBS, hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
ColorSpace: An NSColorSpace object representing a color space. An exception is raised if the color model of the provided color space is not RGB.
hue: The hue (color) component, expressed as a floating-point value in the range 0–1.0.
saturation: The color saturation component, expressed as a floating-point value in the range 0–1.0.
brightness: The brightness component, expressed as a floating-point value in the range 0–1.0.
alpha: The alpha (opacity), expressed as a floating-point value in the range 0 (transparent) to 1.0 (opaque).
Returns the color object.
NSColorMBS.colorWithDeviceCMYK(cyan as Double, magenta as Double, yellow as Double, black as Double, alpha as Double=1.0) as NSColorMBS
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 |
cyan: The cyan component of the color object.
magenta: The magenta component of the color object.
yellow: The yellow component of the color object.
black: The black component of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0. In PostScript, this color space corresponds directly to the device-dependent operator setcmykcolor.
NSColorMBS.colorWithDeviceHSV(hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
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 |
hue: The hue component of the color object.
saturation: The saturation component of the color object.
brightness: The brightness component of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0. In PostScript, this color space corresponds directly to the device-dependent operator setrgbcolor.
Some examples using this method:
NSColorMBS.colorWithDeviceRGB(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 9.8 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
red: The red component of the color object.
green: The green component of the color object.
blue: The blue component of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0. In PostScript, this color space corresponds directly to the device-dependent operator setrgbcolor.
Some examples using this method:
NSColorMBS.colorWithDeviceWhite(white as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 9.8 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
white: The grayscale value of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0. In PostScript, this color space corresponds directly to the device-dependent operator setgray.
NSColorMBS.colorWithDisplayP3(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
red: The red component of the color object.
green: The green component of the color object.
blue: The blue component of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
NSColorMBS.colorWithGenericGamma22White(white as Double, alpha as Double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 13.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
white: The white value of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
Available in OS X v10.7 and later.
NSColorMBS.colorWithHSV(hue as double, saturation as double, brightness as double, alpha as double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
These methods are effectively same as colorWithSRGBHSV:, but provided for easier reuse of code that uses UIColor on iOS. If red, green, blue, or saturation, brightness, or white values are outside of the 0..1 range, these will create colors in the extended sRGB (or for colorWithWhite:alpha:, extendedGenericGamma22GrayColorSpace) color spaces. This behavior is compatible with iOS UIColor.
Some examples using this method:
NSColorMBS.colorWithPatternImage(image as Variant) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 9.8 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The image is tiled starting at the bottom of the window. The image is not scaled.
Parameter is a NSImageMBS object. We declare it as a variant to reduce plugin dependencies.
Some examples using this method:
NSColorMBS.colorWithRGB(red as double, green as double, blue as double, alpha as double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
These methods are effectively same as colorWithSRGBHSV:, but provided for easier reuse of code that uses UIColor on iOS. If red, green, blue, or saturation, brightness, or white values are outside of the 0..1 range, these will create colors in the extended sRGB (or for colorWithWhite:alpha:, extendedGenericGamma22GrayColorSpace) color spaces. This behavior is compatible with iOS UIColor.
NSColorMBS.colorWithSRGB(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
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 |
red: The red component of the color object.
green: The green component of the color object.
blue: The blue component of the color object.
alpha: The opacity value of the color object.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are interpreted as 1.0.
Available in OS X v10.7 and later.
Some examples using this method:
NSColorMBS.colorWithWhite(white as double, alpha as double=1.0) as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
These methods are effectively same as colorWithSRGBHSV:, but provided for easier reuse of code that uses UIColor on iOS. If red, green, blue, or saturation, brightness, or white values are outside of the 0..1 range, these will create colors in the extended sRGB (or for colorWithWhite:alpha:, extendedGenericGamma22GrayColorSpace) color spaces. This behavior is compatible with iOS UIColor.
Some examples using this method:
NSColorMBS.controlAccentColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
This color automatically updates when the accent color preference changes. Do not make assumptions about the color space of this color, which may change across releases.
Available on MacOS 10.14 or newer.
NSColorMBS.controlAlternatingRowBackgroundColors as NSColorMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Available on MacOS 10.3 or newer.
NSColorMBS.controlBackgroundColor as NSColorMBS
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 |
The system color used for the background of large controls such as browsers, table views, and clip views.
NSColorMBS.controlColor as NSColorMBS
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 |
The system color used for the flat surfaces of a control. By default, the control color is a pattern color that will draw the ruled lines for the window background, which is the same as returned by windowBackgroundColor.
If you use controlColor assuming that it is a solid, you may have an incorrect appearance. You should use lightGrayColor in its place.
NSColorMBS.controlDarkShadowColor as NSColorMBS
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 |
Of the two dark borders that run along the bottom and right of controls, representing shadows, the color of the outer, darker border.
NSColorMBS.controlHighlightColor as NSColorMBS
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 |
Of the two light borders that run along the top and left of controls, representing reflections from a light source in the upper left, the color of the inner, duller border.
NSColorMBS.controlLightHighlightColor as NSColorMBS
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 |
Of the two light borders that run along the top and left of controls, representing reflections from a light source in the upper left, the color of the outer, brighter border.
NSColorMBS.controlShadowColor as NSColorMBS
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 |
Of the two dark borders that run along the bottom and right of controls, representing shadows, the color of the inner, lighter border.
NSColorMBS.controlTextColor as NSColorMBS
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 |
NSColorMBS.currentControlTint as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSColorMBS.cyanColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSColorMBS.darkGrayColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSColorMBS.disabledControlTextColor as NSColorMBS
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 |
NSColorMBS.findHighlightColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Requires MacOS 10.13 or newer.
NSColorMBS.grayColor as NSColorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Cocoa Drawing | MBS MacBase Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The items on this page are in the following plugins: MBS MacBase Plugin.