NSColorMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
NSColorMBS class
The class for a Cocoa color.
Example
dim c as NSColorMBS = NSColorMBS.blueColor MsgBox str(c.blueComponent)
22 properties
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:
Some properties using for this class:
Some events using this class:
Some examples using this class:
Blog Entries
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
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