Platforms to show: All Mac Windows Linux Cross-Platform
NSColorMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Drawing | MBS MacBase Plugin | 7.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Example:
dim c as NSColorMBS = NSColorMBS.blueColor
MsgBox str(c.blueComponent)
- 22 properties
- property alphaComponent as Double
- property blackComponent as Double
- property blueComponent as Double
- property brightnessComponent as Double
- property catalogNameComponent as string
- property colorNameComponent as string
- property colorSpaceName as string
- property colorValue as color
- property cyanComponent as Double
- property description as string
- property greenComponent as Double
- property Handle as Integer
- property hueComponent as Double
- property localizedCatalogNameComponent as string
- property localizedColorNameComponent as string
- property magentaComponent as Double
- property numberOfComponents as Integer
- property redComponent as Double
- property saturationComponent as Double
- property Type as Integer
- property whiteComponent as Double
- property yellowComponent as Double
- 23 methods
- method blendedColorWithFraction(alpha as Double, c as NSColorMBS) as NSColorMBS
- method CGColorHandle as Integer
- method colorSpace as NSColorSpaceMBS
- method colorUsingColorSpace(colorSpace as NSColorSpaceMBS) as NSColorMBS
- method colorUsingColorSpaceName(colorSpace as string) as NSColorMBS
- method colorUsingType(type as Integer) as NSColorMBS
- method colorWithAlphaComponent(alpha as Double) as NSColorMBS
- method colorWithSystemEffect(systemEffect as Integer) as NSColorMBS
- method Components as Double()
- method Constructor(c as color)
- method Constructor(red as Double, green as Double, blue as Double, alpha as Double = 1.0)
- method getCMYK(byref cyan as Double, byref magenta as Double, byref yellow as Double, byref black as Double)
- method getCMYK(byref cyan as Double, byref magenta as Double, byref yellow as Double, byref black as Double, byref alpha as Double)
- method getHSV(byref hue as Double, byref saturation as Double, byref brightness as Double)
- method getHSV(byref hue as Double, byref saturation as Double, byref brightness as Double, byref alpha as Double)
- method getRGB(byref red as Double, byref green as Double, byref blue as Double)
- method getRGB(byref red as Double, byref green as Double, byref blue as Double, byref alpha as Double)
- method getWhite(byref white as Double)
- method getWhite(byref white as Double, byref alpha as Double)
- method highlightWithLevel(level as Double) as NSColorMBS
- method patternImage as Variant
- method shadowWithLevel(level as Double) as NSColorMBS
- method writeToPasteboard
- 96 shared methods
- shared method alternateSelectedControlColor as NSColorMBS
- shared method alternateSelectedControlTextColor as NSColorMBS
- shared method alternatingContentBackgroundColors as NSColorMBS()
- shared method blackColor as NSColorMBS
- shared method blueColor as NSColorMBS
- shared method brownColor as NSColorMBS
- shared method clearColor as NSColorMBS
- shared method colorFromPasteboard as NSColorMBS
- shared method colorNamed(colorName as String) as NSColorMBS
- shared method colorWithCalibratedHSV(hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithCalibratedRGB(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithCalibratedWhite(white as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithCatalogName(listName as String, colorName as String) as NSColorMBS
- shared method colorWithCGColor(CGColorHandle as Integer) as NSColorMBS
- shared method colorWithColorSpace(ColorSpace as NSColorSpaceMBS, components() as Double) as NSColorMBS
- shared method colorWithColorSpace(ColorSpace as NSColorSpaceMBS, paramarray components as Double) as NSColorMBS
- shared method colorWithColorSpaceHSV(ColorSpace as NSColorSpaceMBS, hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithDeviceCMYK(cyan as Double, magenta as Double, yellow as Double, black as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithDeviceHSV(hue as Double, saturation as Double, brightness as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithDeviceRGB(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithDeviceWhite(white as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithDisplayP3(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithGenericGamma22White(white as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithHSV(hue as double, saturation as double, brightness as double, alpha as double=1.0) as NSColorMBS
- shared method colorWithPatternImage(image as Variant) as NSColorMBS
- shared method colorWithRGB(red as double, green as double, blue as double, alpha as double=1.0) as NSColorMBS
- shared method colorWithSRGB(red as Double, green as Double, blue as Double, alpha as Double=1.0) as NSColorMBS
- shared method colorWithWhite(white as double, alpha as double=1.0) as NSColorMBS
- shared method controlAccentColor as NSColorMBS
- shared method controlAlternatingRowBackgroundColors as NSColorMBS()
- shared method controlBackgroundColor as NSColorMBS
- shared method controlColor as NSColorMBS
- shared method controlDarkShadowColor as NSColorMBS
- shared method controlHighlightColor as NSColorMBS
- shared method controlLightHighlightColor as NSColorMBS
- shared method controlShadowColor as NSColorMBS
- shared method controlTextColor as NSColorMBS
- shared method currentControlTint as Integer
- shared method cyanColor as NSColorMBS
- shared method darkGrayColor as NSColorMBS
- shared method disabledControlTextColor as NSColorMBS
- shared method findHighlightColor as NSColorMBS
- shared method grayColor as NSColorMBS
- shared method greenColor as NSColorMBS
- shared method gridColor as NSColorMBS
- shared method headerColor as NSColorMBS
- shared method headerTextColor as NSColorMBS
- shared method highlightColor as NSColorMBS
- shared method keyboardFocusIndicatorColor as NSColorMBS
- shared method knobColor as NSColorMBS
- shared method labelColor as NSColorMBS
- shared method lightGrayColor as NSColorMBS
- shared method linkColor as NSColorMBS
- shared method magentaColor as NSColorMBS
- shared method orangeColor as NSColorMBS
- shared method placeholderTextColor as NSColorMBS
- shared method purpleColor as NSColorMBS
- shared method quaternaryLabelColor as NSColorMBS
- shared method redColor as NSColorMBS
- shared method scrollBarColor as NSColorMBS
- shared method scrubberTexturedBackgroundColor as NSColorMBS
- shared method secondaryLabelColor as NSColorMBS
- shared method secondarySelectedControlColor as NSColorMBS
- shared method selectedContentBackgroundColor as NSColorMBS
- shared method selectedControlColor as NSColorMBS
- shared method selectedControlTextColor as NSColorMBS
- shared method selectedKnobColor as NSColorMBS
- shared method selectedMenuItemColor as NSColorMBS
- shared method selectedMenuItemTextColor as NSColorMBS
- shared method selectedTextBackgroundColor as NSColorMBS
- shared method selectedTextColor as NSColorMBS
- shared method separatorColor as NSColorMBS
- shared method shadowColor as NSColorMBS
- shared method systemBlueColor as NSColorMBS
- shared method systemBrownColor as NSColorMBS
- shared method systemGrayColor as NSColorMBS
- shared method systemGreenColor as NSColorMBS
- shared method systemIndigoColor as NSColorMBS
- shared method systemOrangeColor as NSColorMBS
- shared method systemPinkColor as NSColorMBS
- shared method systemPurpleColor as NSColorMBS
- shared method systemRedColor as NSColorMBS
- shared method systemTealColor as NSColorMBS
- shared method systemYellowColor as NSColorMBS
- shared method tertiaryLabelColor as NSColorMBS
- shared method textBackgroundColor as NSColorMBS
- shared method textColor as NSColorMBS
- shared method underPageBackgroundColor as NSColorMBS
- shared method unemphasizedSelectedContentBackgroundColor as NSColorMBS
- shared method unemphasizedSelectedTextBackgroundColor as NSColorMBS
- shared method unemphasizedSelectedTextColor as NSColorMBS
- shared method whiteColor as NSColorMBS
- shared method windowBackgroundColor as NSColorMBS
- shared method windowFrameColor as NSColorMBS
- shared method windowFrameTextColor as NSColorMBS
- shared method yellowColor as NSColorMBS
- 8 constants
System Effect
Constant | Value | Description |
---|---|---|
SystemEffectDeepPressed | 2 |
Deep Pressed |
SystemEffectDisabled | 3 |
Disabled |
SystemEffectNone | 0 |
No |
SystemEffectPressed | 1 |
Pressed |
SystemEffectRollover | 4 |
Rollover |
Color Types
Constant | Value | Description |
---|---|---|
TypeCatalog | 2 |
nColor with a catalog name and a color name. These colors can be dynamic and have multiple underlying color values.one |
TypeComponentBased | 0 |
Colors which have a color space (specified as NSColorSpace) and appropriate number of CGFloat components. |
TypePattern | 1 |
Colors that draw a pattern, specified as an NSImage. |
This class has no sub classes.
Some methods using this class:
- MKPinAnnotationViewMBS.purplePinColor as NSColorMBS
- MKPinAnnotationViewMBS.redPinColor as NSColorMBS
- NSCollectionViewGridLayoutMBS.backgroundColors as NSColorMBS()
- NSCollectionViewGridLayoutMBS.setBackgroundColors(Colors() as NSColorMBS = nil)
- NSCollectionViewMBS.setBackgroundColors(Colors() as NSColorMBS = nil)
- NSCursorMBS.Constructor(image as NSImageMBS, foregroundColorHint as NSColorMBS, backgroundColorHint as NSColorMBS, HotSpotX as Double, HotSpotY as Double)
- NSGraphicsMBS.setFillColor(c as NSColorMBS)
- NSGraphicsMBS.setStrokeColor(c as NSColorMBS)
- NSTextMBS.setTextColorForRange(colorValue as NSColorMBS, start as Integer, length as Integer)
- SCNMaterialPropertyMBS.materialPropertyWithColor(color as NSColorMBS) as SCNMaterialPropertyMBS
Some properties using for this class:
- CalCalendarMBS.Color as NSColorMBS
- MKMarkerAnnotationViewMBS.markerTintColor as NSColorMBS
- MKPinAnnotationViewMBS.pinTintColor as NSColorMBS
- NSDatePickerMBS.backgroundColor as NSColorMBS
- NSScrollViewMBS.backgroundColor as NSColorMBS
- NSShadowMBS.shadowColor as NSColorMBS
- NSTableRowViewMBS.backgroundColor as NSColorMBS
- NSTableViewRowActionMBS.BackgroundColor as NSColorMBS
- PDFAnnotationLineMBS.interiorColor as NSColorMBS
- QCViewMBS.eraseColor as NSColorMBS
Some events using this class:
- NSColorSamplerMBS.Completed(selectedColor as NSColorMBS)
Some examples using this class:
- /Mac64bit/SceneKit/Camera with fix elements
- /Mac64bit/SceneKit/Free form
- /Mac64bit/SceneKit/Physics
- /MacBase/NSColor Matching
- /MacBase/NSDictionary Conversion Test
- /MacCocoa/PDFKit/Create Page with custom stamp annotation
- /MacCocoa/Text in titlebar
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/NSTextView Unlimited Tab
- /MacFrameworks/Calendar/Calendar List
Blog Entries
- Basic Forms in MBS Xojo SceneKit Plugin
- MBS Xojo Plugins, version 19.4pr5
- MBS Xojo Plugins, version 19.3pr7
- Alternating row colors for Dark Mode
- MonkeyBread Software Releases the MBS Xojo Plugins in version 18.4
- MBS Xojo Plugins, version 18.4pr7
- MBS Xojo Plugins, version 17.1pr2
- MBS Real Studio Plugins, version 11.2pr4
- Plugin merge/split
- MBS REALbasic plug-ins version 9.4
Xojo Developer Magazine
- 18.4, page 9: News
- 18.2, page 41: On the Scene Again (Part 2), Getting Started with SceneKit by Stefanie Juchmes
- 18.1, page 26: On the Scene, Getting Started with SceneKit by Stefanie Juchmes
- 17.5, page 37: What's New in the MBS Plugins, With the Plugins growing every year, here are new capabilities you may have missed by Stefanie Juchmes
- 17.2, page 40: Alternating Row Colors for Dark Mode, With Dark Mode, choosing the correct colors is trickier by Christian Schmitz
- 17.1, page 21: Achieving Success on iOS, iOS App Tips by Jérémie Leroy
- 16.6, page 29: Munich 2018, A Report From the MBS Xojo Conference by Marc Zeedar
- 15.5, page 39: Touché, Using Apple's Touch Bar with Xojo by Marc Zeedar
- 14.4, page 10: News
The items on this page are in the following plugins: MBS MacBase Plugin.
NSColorListMBS - NSColorPanelMBS

Links
MBS FileMaker tutorial videos