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 |
- 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()
- NSColorListMBS.colorWithKey(key as string) as NSColorMBS
- NSGraphicsMBS.setFillColor(c as NSColorMBS)
- NSGraphicsMBS.setStrokeColor(c as NSColorMBS)
- NSImageSymbolConfigurationMBS.configurationWithHierarchicalColor(hierarchicalColor as NSColorMBS) as NSImageSymbolConfigurationMBS
- NSMenuMBS.paletteMenuWithColors(colors() as NSColorMBS, itemTitles() as String, templateImage as NSImageMBS = nil) as NSMenuMBS
- NSTextMBS.setTextColorForRange(colorValue as NSColorMBS, start as Integer, length as Integer)
- SCNMaterialPropertyMBS.materialPropertyWithColor(color as NSColorMBS) as SCNMaterialPropertyMBS
Some properties using for this class:
- EKCalendarMBS.color as NSColorMBS
- NSButtonMBS.bezelColor as NSColorMBS
- NSLayoutManagerMBS.textColor as NSColorMBS
- NSScrollViewMBS.backgroundColor as NSColorMBS
- NSSliderMBS.trackFillColor as NSColorMBS
- NSTextViewMBS.backgroundColor as NSColorMBS
- PDFAnnotationTextWidgetMBS.backgroundColor as NSColorMBS
- PDFAppearanceCharacteristicsMBS.borderColor as NSColorMBS
- QCViewMBS.eraseColor as NSColorMBS
- SpinningProgressIndicatorMBS.colorValue as NSColorMBS
Some events using this class:
- NSColorSamplerMBS.Completed(selectedColor as NSColorMBS)
Some examples using this class:
- /Mac64bit/SceneKit/Camera
- /Mac64bit/SceneKit/Triangle Demo
- /MacBase/Menus/MacSonomaMenu
- /MacBase/NSColorSampler
- /MacCocoa/NSColor and Colorspaces
- /MacCocoa/NSView custom focus ring
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/NSTextView Unlimited Tab
- /PDFKit/Add Annotations to PDF
- /PDFKit/PDFViewControlMBS Test
Blog Entries
- More Menubar options in macOS Sonoma
- Styled Text for Labels in your Xojo iOS app
- MBS Xojo Plugins, version 21.2pr2
- Basic Forms in MBS Xojo SceneKit Plugin
- Physics example for SceneKit in Xojo
- MBS Xojo Plugins, version 19.4pr5
- Alternating row colors for Dark Mode
- MonkeyBread Software Releases the MBS Xojo Plugins in version 18.4
- Plugin merge/split
- MBS REALbasic plug-ins version 9.4
Xojo Developer Magazine
- 19.6, page 50: Rotating Christmas Tree, Using the MBS Plugins to create an animated 3D Christmas tree by Stefanie Juchmes
- 19.6, pages 46 to 48: Rotating Christmas Tree, Using the MBS Plugins to create an animated 3D Christmas tree by Stefanie Juchmes
- 18.4, pages 39 to 41: On the Scene Again (Part 3), Getting Started with SceneKit by Stefanie Juchmes
- 18.1, pages 35 to 37: On the Scene, Getting Started with SceneKit by Stefanie Juchmes
- 18.1, pages 32 to 33: On the Scene, Getting Started with SceneKit by Stefanie Juchmes
- 18.1, pages 26 to 27: On the Scene, Getting Started with SceneKit by Stefanie Juchmes
- 17.5, page 40: 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.1, page 10: News
- 15.5, pages 39 to 40: Touché, Using Apple's Touch Bar with Xojo by Marc Zeedar
- 15.5, page 37: Touché, Using Apple's Touch Bar with Xojo by Marc Zeedar
Videos
Release notes
- Version 21.2
- Changes NSAttributedStringMBS and NSColorMBS classes to not reference macOS only function selectors.
- Version 19.4
- Added systemIndigoColor and systemTealColor to NSColorMBS class.
- Version 19.3
- Changed NSColorMBS constructor and colorValue property to always use generic RGB for compatibility to Xojo.
- Version 18.4
- Added 40 new methods to NSColorMBS class for MacOS 10.14 Mojave.
- Fixed bug in NSColorMBS with alpha channel from Xojo color.
- Fixed NSColorMBS.colorValue for new colors on MacOS Mojave.
- Version 17.1
- Added NSColorMBS.Constructor for convenient color creation.
The items on this page are in the following plugins: MBS MacBase Plugin.
NSColorListMBS - NSColorPanelMBS