Share via


NSColor Class

Definition

[Foundation.Register("NSColor", true)]
public class NSColor : Foundation.NSObject, AppKit.INSAccessibilityColor, AppKit.INSPasteboardReading, AppKit.INSPasteboardWriting, Foundation.INSCopying, Foundation.INSSecureCoding, IDisposable
[<Foundation.Register("NSColor", true)>]
type NSColor = class
    inherit NSObject
    interface INSAccessibilityColor
    interface INativeObject
    interface IDisposable
    interface INSCoding
    interface INSCopying
    interface INSPasteboardReading
    interface INSPasteboardWriting
    interface INSSecureCoding
Inheritance
NSColor
Attributes
Implements

Constructors

Name Description
NSColor(NativeHandle)

A constructor used when creating managed representations of unmanaged objects. Called by the runtime.

NSColor(NSCoder)

A constructor that initializes the object from the data stored in the unarchiver object.

NSColor(NSObjectFlag)

Constructor to call on derived classes to skip initialization and merely allocate the object.

Properties

Name Description
AccessibilityName
AlphaComponent
AlternateSelectedControl
AlternateSelectedControlText
AlternatingContentBackgroundColors
Black
BlackComponent
Blue
BlueComponent
BrightnessComponent
Brown
CatalogNameComponent
CGColor
Class (Inherited from NSObject)
ClassHandle

The Objective-C class handle for this class.

Clear
ColorNameComponent
ColorSpace
ColorSpaceName
ComponentCount
Control
ControlAccent
ControlBackground
ControlDarkShadow
ControlHighlight
ControlLightHighlight
ControlShadow
ControlText
CurrentControlTint
Cyan
CyanComponent
DarkGray
DebugDescription (Inherited from NSObject)
Description (Inherited from NSObject)
DisabledControlText
ExposedBindings (Inherited from NSObject)
FindHighlight
Gray
Green
GreenComponent
Grid
Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from NSObject)
Header
HeaderText
Highlight
HueComponent
IgnoresAlpha
IsDirectBinding (Inherited from NSObject)
IsProxy (Inherited from NSObject)
KeyboardFocusIndicator
Knob
Label
LightGray
LinearExposure
Link
LocalizedCatalogNameComponent
LocalizedColorNameComponent
Magenta
MagentaComponent
Orange
PatternImage
PlaceholderText
Purple
QuaternaryLabel
QuaternarySystemFill
QuinaryLabel
QuinarySystemFill
Red
RedComponent
RetainCount (Inherited from NSObject)
SaturationComponent
ScrollBar
ScrubberTexturedBackground
SecondaryLabel
SecondarySelectedControl
SecondarySystemFill
SelectedContentBackground
SelectedControl
SelectedControlText
SelectedKnob
SelectedMenuItem
SelectedMenuItemText
SelectedText
SelectedTextBackground
Self (Inherited from NSObject)
Separator
Shadow
StandardDynamicRangeColor
Superclass (Inherited from NSObject)
SuperHandle

Handle used to represent the methods in the base class for this NSObject.

(Inherited from NSObject)
SystemBlue
SystemBrown
SystemColorsChanged

Notification constant for SystemColorsChanged

SystemCyan
SystemFill
SystemGray
SystemGreen
SystemIndigo
SystemMint
SystemOrange
SystemPink
SystemPurple
SystemRed
SystemTeal
SystemYellow
TertiaryLabel
TertiarySystemFill
Text
TextBackground
TextInsertionPoint
Type
UnderPageBackground
UnemphasizedSelectedContentBackground
UnemphasizedSelectedText
UnemphasizedSelectedTextBackground
White
WhiteComponent
WindowBackground
WindowFrame
WindowFrameText
Yellow
YellowComponent
Zone (Inherited from NSObject)

Methods

Name Description
AddObserver(NSObject, NSString, NSKeyValueObservingOptions, IntPtr) (Inherited from NSObject)
AddObserver(NSObject, String, NSKeyValueObservingOptions, IntPtr) (Inherited from NSObject)
AddObserver(NSString, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AddObserver(String, NSKeyValueObservingOptions, Action<NSObservedChange>)

Registers an object for being observed externally using an arbitrary method.

(Inherited from NSObject)
AwakeFromNib() (Inherited from NSObject)
BeginInvokeOnMainThread(Action) (Inherited from NSObject)
BeginInvokeOnMainThread(Selector, NSObject)

Invokes asynchrously the specified code on the main UI thread.

(Inherited from NSObject)
Bind(NSString, NSObject, String, NSBindingOptions) (Inherited from NSObject)
Bind(NSString, NSObject, String, NSDictionary) (Inherited from NSObject)
BlendedColor(NFloat, NSColor)
ColorWithAlphaComponent(NFloat)
CommitEditing() (Inherited from NSObject)
CommitEditing(NSObject, Selector, IntPtr) (Inherited from NSObject)
ConformsToProtocol(NativeHandle) (Inherited from NSObject)
ControlAlternatingRowBackgroundColors()
Copy() (Inherited from NSObject)
Copy(NSZone)

Performs a copy of the underlying Objective-C object.

DangerousAutorelease()

Calls the 'autorelease' selector on this object.

(Inherited from NSObject)
DangerousRelease()

Calls the 'release' selector on this object.

(Inherited from NSObject)
DangerousRetain()

Calls the 'retain' selector on this object.

(Inherited from NSObject)
DidChange(NSKeyValueChange, NSIndexSet, NSString) (Inherited from NSObject)
DidChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
DidChangeValue(String) (Inherited from NSObject)
Dispose()

Releases the resources used by the NSObject object.

(Inherited from NSObject)
Dispose(Boolean)

Releases the resources used by the NSObject object.

(Inherited from NSObject)
DoesNotRecognizeSelector(Selector) (Inherited from NSObject)
DrawSwatchInRect(CGRect)
EncodeTo(NSCoder)

Encodes the state of the object using the provided encoder.

Equals(NSObject) (Inherited from NSObject)
Equals(Object) (Inherited from NSObject)
FromCalibratedHsb(Byte, Byte, Byte)
FromCalibratedHsb(Int32, Int32, Int32)
FromCalibratedHsb(NFloat, NFloat, NFloat)
FromCalibratedHsba(Byte, Byte, Byte, Byte)
FromCalibratedHsba(Int32, Int32, Int32, Int32)
FromCalibratedHsba(NFloat, NFloat, NFloat, NFloat)
FromCalibratedRgb(Byte, Byte, Byte)
FromCalibratedRgb(Int32, Int32, Int32)
FromCalibratedRgb(NFloat, NFloat, NFloat)
FromCalibratedRgba(Byte, Byte, Byte, Byte)
FromCalibratedRgba(Int32, Int32, Int32, Int32)
FromCalibratedRgba(NFloat, NFloat, NFloat, NFloat)
FromCalibratedWhite(NFloat, NFloat)
FromCatalogName(String, String)
FromCGColor(CGColor)
FromCIColor(CIColor)
FromColor(NSColorSpace, NFloat, NFloat, NFloat, NFloat)
FromColorSpace(NSColorSpace, NFloat[])
FromControlTint(NSControlTint)
FromDeviceCymk(Byte, Byte, Byte, Byte)
FromDeviceCymk(Int32, Int32, Int32, Int32)
FromDeviceCymk(NFloat, NFloat, NFloat, NFloat)
FromDeviceCymka(Byte, Byte, Byte, Byte, Byte)
FromDeviceCymka(Int32, Int32, Int32, Int32, Int32)
FromDeviceCymka(NFloat, NFloat, NFloat, NFloat, NFloat)
FromDeviceHsb(Byte, Byte, Byte)
FromDeviceHsb(Int32, Int32, Int32)
FromDeviceHsb(NFloat, NFloat, NFloat)
FromDeviceHsba(Byte, Byte, Byte, Byte)
FromDeviceHsba(Int32, Int32, Int32, Int32)
FromDeviceHsba(NFloat, NFloat, NFloat, NFloat)
FromDeviceRgb(Byte, Byte, Byte)
FromDeviceRgb(Int32, Int32, Int32)
FromDeviceRgb(NFloat, NFloat, NFloat)
FromDeviceRgba(Byte, Byte, Byte, Byte)
FromDeviceRgba(Int32, Int32, Int32, Int32)
FromDeviceRgba(NFloat, NFloat, NFloat, NFloat)
FromDeviceWhite(NFloat, NFloat)
FromDisplayP3(NFloat, NFloat, NFloat, NFloat)
FromGamma22White(NFloat, NFloat)
FromHsb(Byte, Byte, Byte)
FromHsb(Int32, Int32, Int32)
FromHsb(NFloat, NFloat, NFloat)
FromHsba(Byte, Byte, Byte, Byte)
FromHsba(Int32, Int32, Int32, Int32)
FromHsba(NFloat, NFloat, NFloat, NFloat)
FromName(String, NSBundle)
FromName(String)
FromPasteboard(NSPasteboard)
FromPatternImage(NSImage)
FromRgb(Byte, Byte, Byte)
FromRgb(Int32, Int32, Int32)
FromRgb(NFloat, NFloat, NFloat)
FromRgba(Byte, Byte, Byte, Byte)
FromRgba(Int32, Int32, Int32, Int32)
FromRgba(NFloat, NFloat, NFloat, NFloat)
FromRgbaExposure(NFloat, NFloat, NFloat, NFloat, NFloat)
FromRgbaLinearExposure(NFloat, NFloat, NFloat, NFloat, NFloat)
FromSrgb(NFloat, NFloat, NFloat, NFloat)
FromSystemEffect(NSColorSystemEffect)
FromWhite(NFloat, NFloat)
GetBindingInfo(NSString) (Inherited from NSObject)
GetBindingOptionDescriptions(NSString) (Inherited from NSObject)
GetBindingValueClass(NSString) (Inherited from NSObject)
GetCmyka(NFloat, NFloat, NFloat, NFloat, NFloat)
GetColor(NSColorType)
GetColor(String, Func<NSAppearance,NSColor>)
GetColorByApplyingContentHeadroom(NFloat)
GetComponents(NFloat[])
GetDictionaryOfValuesFromKeys(NSString[]) (Inherited from NSObject)
GetHashCode()

Generates a hash code for the current instance.

(Inherited from NSObject)
GetHsba(NFloat, NFloat, NFloat, NFloat)
GetMethodForSelector(Selector) (Inherited from NSObject)
GetNativeHash() (Inherited from NSObject)
GetPasteboardPropertyListForType(String)
GetReadableTypesForPasteboard(NSPasteboard)
GetReadingOptionsForType(String, NSPasteboard)
GetRgba(NFloat, NFloat, NFloat, NFloat)
GetWhiteAlpha(NFloat, NFloat)
GetWritableTypesForPasteboard(NSPasteboard)
GetWritingOptionsForType(String, NSPasteboard)
HighlightWithLevel(NFloat)
Init() (Inherited from NSObject)
InitializeHandle(NativeHandle, String) (Inherited from NSObject)
InitializeHandle(NativeHandle) (Inherited from NSObject)
Invoke(Action, Double) (Inherited from NSObject)
Invoke(Action, TimeSpan) (Inherited from NSObject)
InvokeOnMainThread(Action) (Inherited from NSObject)
InvokeOnMainThread(Selector, NSObject)

Invokes synchrously the specified code on the main UI thread.

(Inherited from NSObject)
IsEqual(NSObject) (Inherited from NSObject)
IsKindOfClass(Class) (Inherited from NSObject)
IsMemberOfClass(Class) (Inherited from NSObject)
MarkDirty()

Promotes a regular peer object (IsDirectBinding is true) into a toggleref object.

(Inherited from NSObject)
MutableCopy() (Inherited from NSObject)
ObjectDidEndEditing(NSObject) (Inherited from NSObject)
ObserveValue(NSString, NSObject, NSDictionary, IntPtr) (Inherited from NSObject)
PerformSelector(Selector, NSObject, Double, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSObject, Double) (Inherited from NSObject)
PerformSelector(Selector, NSObject, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSObject) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean, NSString[]) (Inherited from NSObject)
PerformSelector(Selector, NSThread, NSObject, Boolean) (Inherited from NSObject)
PerformSelector(Selector) (Inherited from NSObject)
PrepareForInterfaceBuilder() (Inherited from NSObject)
RemoveObserver(NSObject, NSString, IntPtr) (Inherited from NSObject)
RemoveObserver(NSObject, NSString) (Inherited from NSObject)
RemoveObserver(NSObject, String, IntPtr) (Inherited from NSObject)
RemoveObserver(NSObject, String) (Inherited from NSObject)
RespondsToSelector(Selector) (Inherited from NSObject)
Set()
SetFill()
SetNilValueForKey(NSString) (Inherited from NSObject)
SetStroke()
SetValueForKey(NSObject, NSString) (Inherited from NSObject)
SetValueForKeyPath(NativeHandle, NSString) (Inherited from NSObject)
SetValueForKeyPath(NSObject, NSString) (Inherited from NSObject)
SetValueForUndefinedKey(NSObject, NSString) (Inherited from NSObject)
SetValuesForKeysWithDictionary(NSDictionary) (Inherited from NSObject)
ShadowWithLevel(NFloat)
ToString()
Unbind(NSString) (Inherited from NSObject)
UsingColorSpace(NSColorSpace)
UsingColorSpace(String, NSDictionary)
UsingColorSpace(String)
ValueForKey(NSString) (Inherited from NSObject)
ValueForKeyPath(NSString) (Inherited from NSObject)
ValueForUndefinedKey(NSString) (Inherited from NSObject)
WillChange(NSKeyValueChange, NSIndexSet, NSString) (Inherited from NSObject)
WillChange(NSString, NSKeyValueSetMutationKind, NSSet) (Inherited from NSObject)
WillChangeValue(String) (Inherited from NSObject)
WriteToPasteboard(NSPasteboard)

Extension Methods

Name Description
ObjectDidBeginEditing(NSObject, INSEditor)
ObjectDidEndEditing(NSObject, INSEditor)
GetValidModes(NSObject, NSFontPanel)
ValidateToolbarItem(NSObject, NSToolbarItem)
GetWritingOptionsForType(INSPasteboardWriting, String, NSPasteboard)
BrowserAccessibilityDeleteTextAtCursor(NSObject, IntPtr)
BrowserAccessibilityInsertTextAtCursor(NSObject, String)
GetAccessibilityLineEndPositionFromCurrentSelection(NSObject)
GetAccessibilityLineRangeForPosition(NSObject, IntPtr)
GetAccessibilityLineStartPositionFromCurrentSelection(NSObject)
GetBrowserAccessibilityAttributedValue(NSObject, NSRange)
GetBrowserAccessibilityContainerType(NSObject)
GetBrowserAccessibilityCurrentStatus(NSObject)
GetBrowserAccessibilityHasDomFocus(NSObject)
GetBrowserAccessibilityIsRequired(NSObject)
GetBrowserAccessibilityPressedState(NSObject)
GetBrowserAccessibilityRoleDescription(NSObject)
GetBrowserAccessibilitySelectedTextRange(NSObject)
GetBrowserAccessibilitySortDirection(NSObject)
GetBrowserAccessibilityValue(NSObject, NSRange)
SetBrowserAccessibilityContainerType(NSObject, BEAccessibilityContainerType)
SetBrowserAccessibilityCurrentStatus(NSObject, String)
SetBrowserAccessibilityHasDomFocus(NSObject, Boolean)
SetBrowserAccessibilityIsRequired(NSObject, Boolean)
SetBrowserAccessibilityPressedState(NSObject, BEAccessibilityPressedState)
SetBrowserAccessibilityRoleDescription(NSObject, String)
SetBrowserAccessibilitySelectedTextRange(NSObject, NSRange)
SetBrowserAccessibilitySortDirection(NSObject, String)
ProvideImageData(NSObject, IntPtr, UIntPtr, UIntPtr, UIntPtr, UIntPtr, UIntPtr, NSObject)
ProvideImageToMTLTexture(NSObject, IMTLTexture, IMTLCommandBuffer, UIntPtr, UIntPtr, UIntPtr, UIntPtr, NSObject)
SetSharedObservers(NSObject, NSKeyValueSharedObserversSnapshot)
GetDebugDescription(INSObjectProtocol)
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)
AcceptsPreviewPanelControl(NSObject, QLPreviewPanel)
BeginPreviewPanelControl(NSObject, QLPreviewPanel)
EndPreviewPanelControl(NSObject, QLPreviewPanel)

Applies to