Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

NSColorMBS.alternateSelectedControlColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: 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.

Feedback, Comments & Corrections

NSColorMBS.alternateSelectedControlTextColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: 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.

Feedback, Comments & Corrections

NSColorMBS.blackColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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

Feedback, Comments & Corrections

NSColorMBS.blueColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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

Feedback, Comments & Corrections

NSColorMBS.brownColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns an NSColor object whose RGB value is 0.6, 0.4, 0.2 and whose alpha value is 1.0.
Notes:
dim c as NSColorMBS = NSColorMBS.brownColor

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

Feedback, Comments & Corrections

NSColorMBS.clearColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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

Feedback, Comments & Corrections

NSColorMBS.colorFromPasteboard as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: Returns the NSColor currently on the given pasteboard.
Notes: The color currently on the pasteboard or nil if pasteBoard doesn't contain color data.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.colorWithCalibratedWhite(white as Double, alpha as Double=1.0) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.colorWithCGColor(CGColorHandle as Integer) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 12.3 Yes No No Yes, macOS only No
Function: Converts CGColor to NSColor.
Notes:
Return value may be an approximation in some cases, so there isn't guaranteed round-trip fidelity.
Available on Mac OS X 10.8.

Feedback, Comments & Corrections

NSColorMBS.colorWithColorSpace(ColorSpace as NSColorSpaceMBS, components() as Double) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 15.0 Yes No No Yes, macOS only No
Function: 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
Notes:
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:

Feedback, Comments & Corrections

NSColorMBS.colorWithColorSpace(ColorSpace as NSColorSpaceMBS, paramarray components as Double) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 15.0 Yes No No Yes, macOS only No
Function: 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
Notes:
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:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 16.5 Yes No No Yes, macOS only No
Function: Creates and returns an NSColor object with the specified color space, hue, saturation, brightness, and alpha channel values.
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.colorWithDeviceWhite(white as Double, alpha as Double=1.0) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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"
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 16.5 Yes No No Yes, macOS only No
Function: Returns a color created from the specified components in the Display P3 colorspace.
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.colorWithGenericGamma22White(white as Double, alpha as Double=1.0) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 13.4 Yes No No Yes, macOS only No
Function: Returns an color created with the specified white and alpha values in the GenericGamma22 colorspace.
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.colorWithPatternImage(image as Variant) as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 9.8 Yes No No Yes, macOS only No
Function: 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
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 13.4 Yes No No Yes, macOS only No
Function: Returns a color created from the specified components in the sRGB colorspace.
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.controlBackgroundColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: The system color used for the background of large controls such as browsers, table views, and clip views.

Feedback, Comments & Corrections

NSColorMBS.controlColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes:
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.

Feedback, Comments & Corrections

NSColorMBS.controlDarkShadowColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: Of the two dark borders that run along the bottom and right of controls, representing shadows, the color of the outer, darker border.

Feedback, Comments & Corrections

NSColorMBS.controlHighlightColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: 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.

Feedback, Comments & Corrections

NSColorMBS.controlLightHighlightColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: 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.

Feedback, Comments & Corrections

NSColorMBS.controlShadowColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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
Notes: Of the two dark borders that run along the bottom and right of controls, representing shadows, the color of the inner, lighter border.

Feedback, Comments & Corrections

NSColorMBS.controlTextColor as NSColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Cocoa Drawing MBS MacBase Plugin 8.6 Yes No No Yes, macOS only No
Function: 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

Feedback, Comments & Corrections

Next items

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




Links
MBS FileMaker blog