CSS Function Reference

Color Functions

custom-color(source, arguments)

Returns a color from \p source. \p arguments is a list of strings that can be used by the source to determine what color is returned.

Currently the following sources are supported:

  • kcolorscheme: Retrieve colors from KDE's color scheme format.
    Arguments are:
    • color group: active, inactive, disabled
    • color set: window, button, view, header, tooltip, selection, complementary
    • color role: foreground, background, decoration
    • color name:
      • For foreground: text, active, inactive, positive, neutral, negative, link, visited
      • For background: normal, alternate, active, positive, neutral, negative, link, visited
      • For decoration: hover, focus

mix(first_color, second_color, amount)

Mixes two colors by linear interpolating between \p first_color and \p second_color by \p amount.

modify-color(color operation parameter)

Modifies \p color in some way. Supported operations:

  • add Adds two colors together. \p parameter is expected to be another color.
  • subtract Subtracts a color from \p color. \p parameter is expected to be another color.
  • multiply Multiplies two colors together. \p parameter is expected to be another color.
  • set-alpha Sets the alpha value of \p color. \p parameter is expected to be the alpha value.