setAccentColor

open fun setAccentColor(accentColor: Boolean?)(source)
open fun setAccentColor(accentColor: String?)(source)

Sets the system accent color and highlighting of active window border.

The accentColor parameter accepts the following values:

  • Color string - Like true, but sets a custom accent color using standard CSS color formats (Hex, RGB, RGBA, HSL, HSLA, or named colors). Alpha values in RGBA/HSLA formats are ignored and the color is treated as fully opaque.

  • true - Enable accent color highlighting for the window with the system accent color regardless of whether accent colors are enabled for windows in System Settings.

  • false - Disable accent color highlighting for the window regardless of whether accent colors are currently enabled for windows in System Settings.

  • null - Reset window accent color behavior to follow behavior set in System Settings.

Examples: