Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSColorMBS class.

Next items

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
Returns the system color used for the face of a selected control.
Example
dim c as NSColorMBS = NSColorMBS.alternateSelectedControlColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for text in a selected control.
Example
dim c as NSColorMBS = NSColorMBS.alternateSelectedControlTextColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
The background colors for alternating content items: such as table view rows, collection view items.

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
Returns an NSColor object whose grayscale value is 0.0 and whose alpha value is 1.0.
Example
dim c as NSColorMBS = NSColorMBS.blackColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns an NSColor object whose RGB value is 0.0, 0.0, 1.0 and whose alpha value is 1.0.
Example
dim c as NSColorMBS = NSColorMBS.blueColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns an NSColor object whose RGB value is 0.6, 0.4, 0.2 and whose alpha value is 1.0.

dim 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
Returns an NSColor object whose grayscale and alpha values are both 0.0.
Example
dim c as NSColorMBS = NSColorMBS.clearColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the NSColor currently on the given pasteboard.

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
Create catalog colors from values stored with the given name in the Asset Catalog of the main app bundle.

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
Creates and returns an NSColor object using the given opacity and HSB color space components.
Example
dim b as NSColorMBS = NSColorMBS.colorWithCalibratedHSV(1.0, 0.5, 0.2, 1.0)
MsgBox b.description // shows "NSCalibratedRGBColorSpace 0.2 0.1 0.1 1"

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
Creates and returns an NSColor object using the given opacity and RGB components.
Example
dim b as NSColorMBS = NSColorMBS.colorWithCalibratedRGB(1.0, 0.5, 0.2, 1.0)
MsgBox b.description // shows "NSCalibratedRGBColorSpace 1 0.5 0.2 1"

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:

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
Creates and returns an NSColor object using the given opacity and grayscale value.
Example
dim b as NSColorMBS = NSColorMBS.colorWithCalibratedWhite(1.0, 1.0)
MsgBox b.description // shows "NSCalibratedWhiteColorSpace 1 1"

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
Look up and return catalog colors from standard color catalogs, or from NSColorList whose name matches the specified catalog name.

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
Converts CGColor to NSColor.

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
Returns an NSColor object created from the specified components of the given color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericRGBColorSpace
MsgBox n.localizedName

dim co as NSColorMBS = NSColorMBS.colorWithColorSpace(n, 1.0, 0, 0, 1.0)
MsgBox co.description

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
Returns an NSColor object created from the specified components of the given color space.
Example
dim n as NSColorSpaceMBS = NSColorSpaceMBS.genericRGBColorSpace
MsgBox n.localizedName

dim co as NSColorMBS = NSColorMBS.colorWithColorSpace(n, 1.0, 0, 0, 1.0)
MsgBox co.description

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
Creates and returns an NSColor object with the specified color space, hue, saturation, brightness, and alpha channel values.

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
Creates and returns an NSColor object using the given opacity value and CMYK components.
Example
dim b as NSColorMBS = NSColorMBS.colorWithDeviceCMYK(0.5, 1.0, 0.5, 0.2, 1.0)
MsgBox b.description // shows "NSDeviceCMYKColorSpace 0.5 1 0.5 0.2 1"

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
Creates and returns an NSColor object using the given opacity value and HSB color space components.
Example
dim b as NSColorMBS = NSColorMBS.colorWithDeviceHSV(1.0, 0.5, 0.2, 1.0)
MsgBox b.description // shows "NSDeviceRGBColorSpace 0.2 0.1 0.1 1"

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
Creates and returns an NSColor object using the given opacity value and RGB components.
Example
dim b as NSColorMBS = NSColorMBS.colorWithDeviceRGB(1.0, 0.5, 0.2, 1.0)
MsgBox b.description // shows "NSDeviceRGBColorSpace 1 0.5 0.2 1"

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
Creates and returns an NSColor object using the given opacity and grayscale values.
Example
dim b as NSColorMBS = NSColorMBS.colorWithDeviceWhite(1.0, 1.0)
MsgBox b.description // shows "NSDeviceWhiteColorSpace 1 1"

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
Returns a color created from the specified components in the Display P3 colorspace.

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
Returns an color created with the specified white and alpha values in the GenericGamma22 colorspace.

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
Create component-based colors that are compatible with sRGB colorspace.

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
Creates and returns an NSColor object that uses the specified image pattern.
Example
dim p as Picture = LogoMBS(100)
dim n as new NSImageMBS(p)
dim c as NSColorMBS = NSColorMBS.colorWithPatternImage(n)
dim x as NSImageMBS = c.patternImage

Backdrop=x.CopyPictureWithMask

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
Create component-based colors that are compatible with sRGB colorspace.

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
Returns a color created from the specified components in the sRGB colorspace.

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
Create component-based colors that are compatible with sRGB colorspace.

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
A dynamic color that reflects the user's current preferred accent color.

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
The background colors for alternating content items: such as table view rows, collection view items.

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
Returns the system color used for the background of large controls.
Example
dim c as NSColorMBS = NSColorMBS.controlBackgroundColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for the flat surfaces of a control.
Example
dim c as NSColorMBS = NSColorMBS.controlColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for the dark edge of the shadow dropped from controls.
Example
dim c as NSColorMBS = NSColorMBS.controlDarkShadowColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for the highlighted bezels of controls.
Example
dim c as NSColorMBS = NSColorMBS.controlHighlightColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for light highlights in controls.
Example
dim c as NSColorMBS = NSColorMBS.controlLightHighlightColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for the shadows dropped from controls.
Example
dim c as NSColorMBS = NSColorMBS.controlShadowColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for text on controls that aren't disabled.
Example
dim c as NSColorMBS = NSColorMBS.controlTextColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns current system control tint.

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
Returns an NSColor object whose RGB value is 0.0, 1.0, 1.0 and whose alpha value is 1.0.
Example
dim c as NSColorMBS = NSColorMBS.cyanColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns an NSColor object whose grayscale value is 1/3 and whose alpha value is 1.0.
Example
dim c as NSColorMBS = NSColorMBS.darkGrayColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Returns the system color used for text on disabled controls.
Example
dim c as NSColorMBS = NSColorMBS.disabledControlTextColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

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
Background color of find indicators: the bubbles that show inline search result hits.

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
Returns an NSColor object whose grayscale value is 0.5 and whose alpha value is 1.0.
Example
dim c as NSColorMBS = NSColorMBS.grayColor

window1.Title=c.description
window1.HasBackColor=true
window1.backcolor=c.colorValue

Next items

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


The biggest plugin in space...