# NSColorAddition

{% hint style="info" %}
Module
{% endhint %}

## Overview

### Methods

| Overview                                                                                                                                                            |                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AddSystemEffect](/add-ons/cstruecolors/documentation/nscoloraddition.md#addsystemeffect-extends-c-as-color-effect-as-nscoloraddition-nscolorsystemeffect-as-color) | [BlendColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#blendcolor-extends-c-as-color-blendcolor-as-color-fraction-as-double-as-color)                                                |
| [ChangeAlpha](/add-ons/cstruecolors/documentation/nscoloraddition.md#changealpha-extends-c-as-color-alpha-as-double-integer-as-color)                               | [Draw](/add-ons/cstruecolors/documentation/nscoloraddition.md#draw-extends-c-as-color-optional-g-as-graphics-x-as-double-y-as-double-w-as-double-h-as-double)                                     |
| [FillRectangle](/add-ons/cstruecolors/documentation/nscoloraddition.md#fillrectangle-extends-g-as-graphics-x-as-double-y-as-double-w-as-double-h-as-double)         | [Highlight](/add-ons/cstruecolors/documentation/nscoloraddition.md#highlight-extends-c-as-color-level-as-double-as-color)                                                                         |
| [MultiplyColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#multiplycolor-extends-c-as-color-level-as-double-1-0-as-color)                               | [RegisterForSystemColorChangeNotification](/add-ons/cstruecolors/documentation/nscoloraddition.md#registerforsystemcolorchangenotification-receiver-as-nscoloraddition-systemcolorchangereceiver) |
| [ScrubberTexturedBackgroundColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#scrubbertexturedbackgroundcolor-as-ptr)                                    | [SetColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#setcolor-extends-c-as-color)                                                                                                    |
| [SetFillColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#setfillcolor-extends-c-as-color)                                                              | [SetStrokeColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#setstrokecolor-extends-c-as-color)                                                                                        |
| [Shadow](/add-ons/cstruecolors/documentation/nscoloraddition.md#shadow-extends-c-as-color-level-as-double-as-color)                                                 | [SystemVersionIsAtLeast](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemversionisatleast-majorversion-as-integer-minorversion-as-integer-0-patchversion-as-integer-0-as-boolean)    |

### Properties

{% hint style="info" %}
The macOS colors are also available as methods returning the Ptr to the NSColor representation of the color. To avoid confusions with the Xojo built-in colors, the module’s Xojo colors are named with an underline before "Color" while the methods are protected module methods and don’t use an underscore in their name. \
The exception is *ScrubberTexturedBackgroundColor* which has no Xojo color translation. It is a macOS only NSColor made of a repeating image.
{% endhint %}

| Overview                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AlternateSelectedControlText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#alternateselectedcontroltext_color-as-color)                                                                                                              | [AlternatingContentBackground\_Color0](/add-ons/cstruecolors/documentation/nscoloraddition.md#alternatingcontentbackground_color0-as-color)                                                                                                           |
| [AlternatingContentBackground\_Color1](/add-ons/cstruecolors/documentation/nscoloraddition.md#alternatingcontentbackground_color1-as-color)                                                                                                            | [Clear\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#clear_color-as-color)                                                                                                                                                           |
| [ControlAccent\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#controlaccent_color-as-color)                                                                                                                                            | [ControlBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#controlbackground_color-as-color)                                                                                                                                   |
| [ControlText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#controltext_color-as-color)                                                                                                                                                | [Control\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#control_color-as-color)                                                                                                                                                       |
| [CurrentControl\_Tint](/add-ons/cstruecolors/documentation/nscoloraddition.md#currentcontrol_tint-as-nscontroltint)                                                                                                                                    | [DisabledControlText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#disabledcontroltext_color-as-color)                                                                                                                               |
| [FindHighlight\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#findhighlight_color-as-color)                                                                                                                                            | [Grid\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#grid_color-as-color)                                                                                                                                                             |
| [HeaderText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#headertext_color-as-color)                                                                                                                                                  | [Highlight\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#highlight_color-as-color)                                                                                                                                                   |
| [KeyboardFocusIndicator\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#keyboardfocusindicator_color-as-color)                                                                                                                          | [Label\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#label_color-as-color)                                                                                                                                                           |
| [Link\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#link_color-as-color)                                                                                                                                                              | [PlaceholderText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#placeholdertext_color-as-color)                                                                                                                                       |
| [QuaternaryLabel\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#quaternarylabel_color-as-color)                                                                                                                                        | [ScrollBar\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#scrollbar_color-as-color)                                                                                                                                                   |
| [SecondaryLabel\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#secondarylabel_color-as-color)                                                                                                                                          | [SelectedContentBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedcontentbackground_color-as-color)                                                                                                                   |
| [SelectedControlText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedcontroltext_color-as-color)                                                                                                                                | [SelectedControl\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedcontrol_color-as-color)                                                                                                                                       |
| [SelectedMenuItemText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedmenuitemtext_color-as-color)                                                                                                                              | [SelectedMenuItem\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedmenuitem_color-as-color)                                                                                                                                     |
| [SelectedTextBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedtextbackground_color-as-color)                                                                                                                          | [SelectedText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedtext_color-as-color)                                                                                                                                             |
| [Separator\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#separator_color-as-color)                                                                                                                                                    | [Shadow\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#shadow_color-as-color)                                                                                                                                                         |
| [SystemBlue\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color)   | [SystemBrown\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color) |
| [SystemGray\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color)   | [SystemGreen\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color) |
| [SystemOrange\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color) | [SystemPink\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color)  |
| [SystemPurple\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color) | [SystemRed\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color)   |
| [SystemYellow\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemblue_color-systembrown_color-systemgray_color-systemgreen_color-systemorange_color-systempink_color-systempurple_color-systemred_color-systemyellow_color-as-color) | [TertiaryLabel\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#tertiarylabel_color-as-color)                                                                                                                                           |
| [TextBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#textbackground_color-as-color-mac-win)                                                                                                                                  | [Text\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#text_color-as-color)                                                                                                                                                             |
| [UnderPageBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#underpagebackground_color-as-color)                                                                                                                                | [UnemphasizedSelectedContentBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#unemphasizedselectedcontentbackground_color-as-color)                                                                                           |
| [UnemphasizedSelectedTextBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#unemphasizedselectedtextbackground_color-as-color)                                                                                                  | [UnemphasizedSelectedText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#unemphasizedselectedtext_color-as-color)                                                                                                                     |
| [WindowBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#windowbackground_color-as-color)                                                                                                                                      | [WindowFrameText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#windowframetext_color-as-color)                                                                                                                                       |
| [WindowFrame\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#windowframe_color-as-color)                                                                                                                                                |                                                                                                                                                                                                                                                       |
| [WIN\_ButtonHighlight\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_buttonhighlight_color-as-color)                                                                                                                               | [WIN\_CaptionText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_captiontext_color-as-color)                                                                                                                                      |
| [WIN\_Desktop\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_desktop_color-as-color)                                                                                                                                               | [WIN\_GradientActiveCaption\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_gradientactivecaption_color-as-color)                                                                                                                  |
| [WIN\_GradientInactiveCaption\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_gradientinactivecaption_color-as-color)                                                                                                               | [WIN\_Infotext\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_infotext_color-as-color)                                                                                                                                            |
| [WIN\_MenubarBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_menubarbackground_color-as-color)                                                                                                                           | [WIN\_MenuText\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_menutext_color-as-color)                                                                                                                                            |
| [WIN\_WindowBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#win_windowbackground_color-as-color)                                                                                                                             |                                                                                                                                                                                                                                                       |

### Enumerations

| Overview                                                                                          |                                                                                       |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| [NSColorSystemEffect](/add-ons/cstruecolors/documentation/nscoloraddition.md#nscolorsystemeffect) | [NSControlTint](/add-ons/cstruecolors/documentation/nscoloraddition.md#nscontroltint) |

### Interfaces

| Overview                                                                                                      |   |
| ------------------------------------------------------------------------------------------------------------- | - |
| [SystemColorChangeReceiver](/add-ons/cstruecolors/documentation/nscoloraddition.md#systemcolorchangereceiver) |   |

![High Sierra dynamic colors when selection color is Blue and appearance set to Graphite.](/files/-LMqtohaGxxzXvFhBGkS)

![Mojave dynamic colors in Light Mode with AccentColor green + SelectionColor blue](/files/-LMrkyl2j4KA1NwZdPxe)

![Mojave dynamic colors in Dark Mode with AccentColor green + SelectionColor blue](/files/-LMrlFucxsTZUd8t5hx5)

![Dynamic system colors under Windows 10 with standard setting (SelectionColor Blue)](/files/-LMrbaeK6yYar-y4jnpA)

<br>

![Windows colors without a direct Mac equivalent ](/files/-LMrbqAg06rB6ms7ml7k)

## Documentation

### Methods

#### AddSystemEffect(extends c As Color, effect As NSColorAddition.NSColorsystemEffect) As Color

{% hint style="info" %}
macOS only!
{% endhint %}

Returns a new color that represents the current color modified to include the specified visual effect. Available since macOS 10.14. Returns the original color on systems below Mojave or on Windows.

#### BlendColor(extends c As color, BlendColor As Color, Fraction As Double) As Color

Blends the current color with the specified fraction of BlendColor and returns the result as a new color. Uses the natvie NSColor method on macOS and a Xojo calculation on other systems.

#### ChangeAlpha(extends c As Color, alpha As Double/Integer) As Color

Changes the alpha value to the new value and returns the color. Uses alpha between 0.0 and 1.0 for Doubles like macOS or values between 0 and 255 for Integers.

#### Draw(extends c As Color, *optional* g As Graphics, x As Double, y As Double, w As Double, h As Double)

Draws the color in a rect of the current context. Inverts y if you pass the graphics context. Method without context is macOS only!

#### FillRectangle(extends g as graphics, x as double, y as double, w as double, h as double)

{% hint style="info" %}
macOS only!
{% endhint %}

Fills the specified rectangle of the current graphics context with the currently set FillColor. See [*SetColor*](/add-ons/cstruecolors/documentation/nscoloraddition.md#setcolor-extends-c-as-color), [*SetFillColor*](/add-ons/cstruecolors/documentation/nscoloraddition.md#setfillcolor-extends-c-as-color).&#x20;

#### Highlight(extends c As Color, Level As Double) As Color

Creates a new color that represents a blend between the current color and the highlight color. On Windows multiplies c with [*Highlight\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#highlight_color-as-color).

#### MultiplyColor(extends c As Color, Level As Double = 1.0) As Color

Multiplies the current color with the specified fraction of MultiplyColor and returns the result as a new color.

#### RegisterForSystemColorChangeNotification(Receiver As NSColorAddition.SystemColorChangeReceiver)

Allows a control that incorporates the SystemColorChangeReceiver interface to register for system color changes. Auto-unregisters (no need to unregister the control).&#x20;

{% hint style="warning" %}
On macOS, changes of Dark Mode trigger a refresh of all controls automatically, as well as changing the tint in eralier macOS versions. A change of the selection color anyhow does not trigger an update. When a control registers on this method, the interface’s SystemColorsChanged method will be called even on selection changes.\
\
On current Windows, changes of the Windows Dark Mode are not registered. Changes to system color palette and high contrast modes are.
{% endhint %}

#### ScrubberTexturedBackgroundColor As Ptr

{% hint style="info" %}
macOS only!\
Please note that macOS has Ptrs like this for all the dynamic system colors.
{% endhint %}

The patterned color to use for the background of a scrubber control. Available since macOS 10.12. Nil below. Has no Xojo conversion.

#### SetColor(extends c As Color)

{% hint style="info" %}
macOS only!
{% endhint %}

Sets the color to be used in subsequent cgcontext draw commands.&#x20;

#### SetFillColor(extends c As Color)

{% hint style="info" %}
macOS only!
{% endhint %}

Sets the color to be used as fill color in subsequent cgcontext draw commands.

#### SetFillColor(extends g As Graphics, value As Ptr)

{% hint style="info" %}
macOS only!
{% endhint %}

Sets the color to be used as fill color in subsequent cgcontext draw commands. Useful for the NSColorPtrs – see [ScrubberTexturedBackgroundColor](/add-ons/cstruecolors/documentation/nscoloraddition.md#scrubbertexturedbackgroundcolor-as-ptr).

#### SetStrokeColor(extends c As Color)

{% hint style="info" %}
macOS only!
{% endhint %}

Sets the color to be used as stroke color in subsequent cgcontext draw commands.

#### Shadow(extends c As Color, Level As Double) As Color

Creates a new color that represents a blend between the current color and the Shadow color. On Windows multiplies c with Shadow\_Color.

#### SystemVersionIsAtLeast(majorversion As Integer, minorversion A sInteger = 0, patchversion As Integer = 0) As Boolean

Returns a Boolean that indicates if the current system version is equal or higher than the specified version. Compares the Service Pack Major Number as Patchversion on Windows. A check for Mojave would be

```
Dim b as Boolean = SystemVersionIsAtLeast(10, 14)
```

{% hint style="warning" %}
On Windows, thies method returns the result against the system the app is manifested for. If you do not use a valid Windows 10 manifest, this method will check against Windows 8 minor version 2.
{% endhint %}

### Properties

{% hint style="info" %}
See also the hint at the Overview. \
These, with the exception of Current\_Tint, are all read-only-properties of type Color. They can change their values whenever the user changes a system color or Dark Mode, so use them directly in the context of a Paint event. Do not cache them longer than one redraw cycle.
{% endhint %}

#### AlternateSelectedControlText\_Color As Color

The color to use for text in a selected control. (Mac + Win)\
Returns [*SelectedControlText\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedcontroltext_color-as-color) on Windows.

#### AlternatingContentBackground\_Color0 As Color

The base color to use for alternating content, typically found in table views and collection views. (Mac + Win)\
Returns *ColorActiveBorder* on Windows.

{% hint style="info" %}
If you want a table to color its rows rather blueish on standard Windows systems, use *WIN\_GradientActiveCaption\_Color* and *WIN\_GradientInactiveCaptionColor* instead of Alternating…Color0 and 1.
{% endhint %}

#### AlternatingContentBackground\_Color1 As Color

The alternating color to use for alternating content, typically found in table views and collection views. (Mac + Win)\
Returns *ColorInactiveBorder* on Windows.

#### Clear\_Color As Color

An invisible color. (All platforms)

#### ControlAccent\_Color As Color

The user's current accent color preference. (Mac + Win)\
Available since macOS 10.14. Makes a fallback to controlTintColor(CurrentControlTint) on systems below.\
Returns [*DisabledControlText\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#disabledcontroltext_color-as-color) on Windows.

#### ControlBackground\_Color as Color&#x20;

The color to use for the background of large controls, such as scroll views or table views. (Mac + Win)\
Returns [*Highlight\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#highlight_color-as-color) on Windows.

#### ControlText\_Color As Color

The color to use for text on enabled controls. (Mac + Win)\
Returns *ColorButtonText* on Windows.

#### Control\_Color As Color

The color to use for the flat surfaces of a control. (Mac + Win)\
Returns *ColorButtonFace* on Windows.

#### CurrentControl\_Tint As NSControlTint

{% hint style="info" %}
macOS only!
{% endhint %}

The current system control tint color.

#### DisabledControlText\_Color As Color

The color to use for text on disabled controls. (Mac + Win)\
Returns *ColorInactiveCaption* on Windows.

#### FindHighlight\_Color As Color

The highlight color to use for the bubble that shows inline search result values. (Mac + Win)\
\&#xNAN;***Available since macOS 10.13***. Makes a fallback to HighlightColor below.\
Returns *ColorInfoBackground* on Windows.

#### Grid\_Color As Color

The color to use for the optional gridlines, such as those in a table view. (Mac + Win)\
Returns *ColorButtonShadow* on Windows.

#### HeaderText\_Color As Color

The color to use for text in header cells in table views and outline views. (Mac + Win)\
Returns [*Text\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#text_color-as-color) on Windows.

#### Highlight\_Color As Color

The color to use as a virtual light source on the screen. (Mac + Win)\
Returns *Color3DLight* on Windows.

{% hint style="info" %}
Do not confuse Hightlight\_Color with Xojo’s HighlightColor where this represents rather the Accent or SelectionColor.
{% endhint %}

#### KeyboardFocusIndicator\_Color As Color

The color to use for the keyboard focus ring around controls. (Mac + Win)\
Returns *ColorMenuHighlight* on Windows.

#### Label\_Color As Color

The color to use for text labels. (Mac + Win)\
Returns *Text\_Color* with an alpha of .85 on Windows.

#### Link\_Color As Color

The color to use for links. (Mac + Win)\
Returns *HotLightColor* on Windows.

#### PlaceholderText\_Color As Color

The color to use for placeholder text in controls or text views. (Mac + Win)\
Returns *ColorDisabledText* on Windows.

#### QuaternaryLabel\_Color As Color

The quaternary color to use for text labels. (All platforms)\
Returns *Text\_Color.ChangeAlpha(0.35)* on non-Mac.

#### ScrollBar\_Color As Color

The system color used for scroll “bars”—that is, for the groove in which a scroller’s knob moves (Mac + Win). ***Deprecated*** on macOS 10.14. Use an NSScroller instead.

#### SecondaryLabel\_Color As Color

The secondary color to use for text labels. (All platforms)\
Returns *Text\_Color.ChangeAlpha(0.75)* on non-Mac.

#### SelectedContentBackground\_Color As Color

The color to use for the background of selected and emphasized content. (Mac + Win)\
\&#xNAN;***Available*** since macOS 10.14. Makes a fallback to *SelectedControl\_Color* below.\
Returns [*SelectedMenuItem\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedmenuitem_color-as-color) on Windows.

#### SelectedControlText\_Color As Color

The color to use for text in a selected control—that is, a control being clicked or dragged. (Mac + Win)\
Returns *ColorHighlightText* on Windows.

#### SelectedControl\_Color As Color

The color to use for the face of a selected control—that is, a control that has been clicked or is being dragged. (Mac + Win)\
Returns *ColorHighlightControl* on Windows.

#### SelectedMenuItemText\_Color As Color

The color to use for the text in selected menu items. (Mac + Win)\
Returns *ColorActiveCaption* on Windows.

#### SelectedMenuItem\_Color As Color

The color to use for the face of selected menu items. (Mac + Win). \
\&#xNAN;***Deprecated*** on macOS 10.14. Use an NSVisualEffectView instead.\
Returns *ColorMenuHighlight* on Windows.

#### SelectedTextBackground\_Color As Color

The color to use for the background of selected text. (Mac + Win)\
Returns [*SelectedMenuItem\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedmenuitem_color-as-color) on Windows.

#### SelectedText\_Color As Color

The color to use for selected text. (Mac + Win)\
Returns *ColorActiveCaption* on Windows.

#### Separator\_Color As Color

The color to use for separators between different sections of content. (Mac + Win)\
&#x20;***Available*** since macOS 10.14. Makes a fallback to *Grid\_Color* on systems below.\
Returns *ColorMDIBackground* on Windows.

#### Shadow\_Color As Color

The color to use for virtual shadows cast by raised objects on the screen. (Mac + Win)\
Returns *Color3DDarkShadow* on Windows.

#### SystemBlue\_Color, SystemBrown\_Color, SystemGray\_Color, SystemGreen\_Color, SystemOrange\_Color, SystemPink\_Color, SystemPurple\_Color, SystemRed\_Color, SystemYellow\_Color As Color

A color for the respectively named color that automatically adapts to vibrancy and accessibility settings. (all platforms). \
Returns the normal color of that name on non-Mac systems, with the exception of *Color.Magenta* for *SystemPink\_Color*.

#### TertiaryLabel\_Color As Color

The tertiary color to use for text labels. (All platforms)\
Returns *Text\_Color.ChangeAlpha(0.55)* on non-Mac systems.

#### TextBackground\_Color As Color&#x20;

The color to use for the background area behind text. (Mac + Win)\
Returns *Color\_WindowBackground* on Windows.

#### Text\_Color As Color

The color to use for plain text. (Mac + Win)\
Returns ColorWindowText on Windows.

#### UnderPageBackground\_Color As Color

The color to use in the area beneath your window's views. (Mac + Win)\
Returns *ColorMDIBackground* on Windows.

#### UnemphasizedSelectedContentBackground\_Color As Color

The color to use for selected and unemphasized content. (Mac + Win)\
\&#xNAN;***Available*** since macOS 10.14. Makes a fallback to *ControlContent\_Color* below.\
Returns [*SelectedContentBackground\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedcontentbackground_color-as-color) on Windows.

#### UnemphasizedSelectedTextBackground\_Color As Color

The color to use for the text background in an unemphasized context. (Mac + Win)\
\&#xNAN;***Available*** since macOS 10.14. Makes a fallback to *SelectedTextBackground\_Color* below.\
Returns [*SelectedTextBackground\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedtextbackground_color-as-color) on Windows.

#### UnemphasizedSelectedText\_Color As Color

The color to use for selected text in an unemphasized context. (Mac + Win)\
\&#xNAN;***Available*** since macOS 10.14. Makes a fallback to *SelectedText\_Color* on systems below.\
Returns [*SelectedText\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#selectedtext_color-as-color) on Windows.

#### WindowBackground\_Color As Color

The color to use for the window background. (Mac + Win)

{% hint style="warning" %}
Please note that the system color for the window background on standard Windows 10 for example is white, not the light gray color that Xojo uses for the standard background.
{% endhint %}

#### WindowFrameText\_Color As Color

The color to use for text in a window's frame. (Mac + Win)\
Returns *ColorWindowText* on Windows.

#### WindowFrame\_Color As Color

The system color used for window frames, except for their text. (Mac + Win). \
\&#xNAN;***Deprecated*** on macOS 10.14. Use an NSVisualEffectView with the NSVisualEffectMaterialTitlebar material instead.\
Returns *ColorWindowFrame* on Windows.

{% hint style="info" %}
The following properties are Window color properties that could not easily be mapped to existing NSColor Mac properties. You can use them xplatform as well.
{% endhint %}

#### WIN\_ButtonHighlight\_Color As Color

Highlight color for three-dimensional display elements (for edges facing the light source.) (Win + Mac)\
Returns [*Highlight\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#highlight_color-as-color) on Mac.

#### WIN\_CaptionText\_Color As Color

Text in caption, size box, and scroll bar arrow box. (Win + Mac)\
Returns [*ControlText\_color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#controltext_color-as-color) on Mac.

#### WIN\_Desktop\_Color As Color

The desktop color. As this is usually a picture, often returns black. (WIn + Mac)\
Returns [*UnderPageBackground\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#underpagebackground_color-as-color) on Mac.

#### WIN\_GradientActiveCaption\_Color As Color

Right side color in the color gradient of an active window's title bar. Also good for Alternating Content together with WIN\_InactiveGradientColor (Win + Mac)\
Returns [*AlternatingContentBackground\_Color0*](/add-ons/cstruecolors/documentation/nscoloraddition.md#alternatingcontentbackground_color0-as-color) on Mac.

#### WIN\_GradientInactiveCaption\_Color As Color

Left side color in the color gradient of an inactive window's title bar. Also good for Alternating Content together with WIN\_ActiveGradientColor (Win + Mac)\
Returns [*AlternatingContentBackground\_Color1*](/add-ons/cstruecolors/documentation/nscoloraddition.md#alternatingcontentbackground_color1-as-color) on Mac.

#### WIN\_Infotext\_Color As Color

Text color for tooltip controls. (Win + Mac)\
Returns [*Label\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#label_color-as-color) on Mac.

#### WIN\_MenubarBackground\_Color As Color

The background color for the menu bar when menus appear as flat menus. (Win + Mac)\
Returns [*Control\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#control_color-as-color) on Mac.

#### WIN\_MenuText\_Color As Color

Text color in Menus (Win + Mac)\
Returns [*Text\_Color*](/add-ons/cstruecolors/documentation/nscoloraddition.md#text_color-as-color) on Mac.

#### WIN\_Menu\_Color As Color

Windows menu color.\
Returns [ControlBackground\_Color](/add-ons/cstruecolors/documentation/nscoloraddition.md#controlbackground_color-as-color) on Mac.

### Enumerations

#### NSColorSystemEffect

Values for the mac-only [*AddSystemEffect*](/add-ons/cstruecolors/documentation/nscoloraddition.md#addsystemeffect-extends-c-as-color-effect-as-nscoloraddition-nscolorsystemeffect-as-color) method:

| Value       | Definition                                               |
| ----------- | -------------------------------------------------------- |
| None        | no additional effect                                     |
| Pressed     | The color that indicates the item was pressed.           |
| DeepPressed | The color that indicates the item received a deep press. |
| Disabled    | The color that indicates the item is disabled.           |
| RollOver    | The color that indicates the mouse rolled over the item. |

#### NSControlTint

Values for the **deprecated** [*CurrentControl\_Tint*](/add-ons/cstruecolors/documentation/nscoloraddition.md#currentcontrol_tint-as-nscontroltint) property. Necessary for the fallback on older Mac systems than Mojave. Values:

| Value    | Definition                        |
| -------- | --------------------------------- |
| Default  | The current default tint setting. |
| Blue     | Aqua control tint.                |
| Graphite | Graphite control tint.            |
| Clear    | Clear control tint.               |

### Interfaces

#### SystemColorChangeReceiver

Any class incorporating this interface can use the [*RegisterForSystemColorChangeNotification*](/add-ons/cstruecolors/documentation/nscoloraddition.md#registerforsystemcolorchangenotification-receiver-as-nscoloraddition-systemcolorchangereceiver) method. If done so, on each system color change the instances’

**SystemColorChanged**()

method will be triggered. Use it to update custom, mode-dependend content.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xojo.gitbook.io/add-ons/cstruecolors/documentation/nscoloraddition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
