aerothemeplasma/Documentation/Software/KWin/AeroColorMixer.md

9.1 KiB
Executable File

AEROCOLORMIXER (DEPRECATED)

TABLE OF CONTENTS

  1. Detailed description
  2. Configuration file
  3. List of files modified by AeroColorMixer
  4. Notes

Detailed description

The appearance of transparent glass textures in this theme is managed by two separate programs that define color information differently. KDE Plasma's shell renders many of its elements by loading in SVG files as textures, while KWin's window decorations are managed by Smaragd.

AeroColorMixer manages both Smaragd and Plasma's shell at the same time in order to provide a unified accent color across the entire desktop. It is designed to look and function like Windows 7's Personalization menu, including the accent colors found on Windows 7. The accent colors were directly pulled from the following registry key:

[ HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor ]

On Windows Vista, 7 and 8.1, this registry key holds the currently applied accent color, stored in the hexadecimal AARRGGBB format. The predefined colors are:

Color Name Value
      Sky #6b74b8fc
      Twilight #a80046ad
      Sea #8032cdcd
      Leaf #6614a600
      Lime #6697d937
      Sun #54fadc0e
      Pumpkin #80ff9c00
      Ruby #a8ce0f0f
      Fuchsia #66ff0099
      Blush #70fcc7f8
      Violet #856e3ba1
      Lavander #528d5a94
      Taupe #6698844c
      Chocolate #a84f1b1b
      Slate #80555555
      Frost #54fcfcfc
      Sunset #89e61f8c

Sunset is a predefined color exclusive to AeroThemePlasma, as it wasn't featured in Windows 7.

Windows Vista and 8.1 feature a unique selection of colors as well. Vista features significantly less colors than Windows 7, with a lot more straightforward color names:

Color Name Value
      Default #45409efe
      Graphite #a3000000
      Blue #a8004ade
      Teal #82008ca5
      Red #9cce0c0f
      Orange #a6ff7700
      Pink #49f93ee7
      Frost #cceff7f7

Windows 8.1 features almost the same number of colors as Windows 7 (albeit with very disappointing names) and includes a new feature that can determine the accent color from the wallpaper by choosing its dominant color:

Color Value
      #c48f8f8f
      #c484c6ff
      #c4f276c9
      #c4f0c300
      #c492cb2a
      #c44ccdcd
      #c4ff981d
      #c4ff4040
      #c4ff57ab
      #c40abf46
      #c4c071ff
      #c454afff
      #c48c90ff
      #c4b09d8b
      #c4ffffff



While not very conclusive, here is a useful thread for more information on how accent colors work in Aero, focused mainly on Windows 7.

Configuration file

AeroColorMixer has a configuration file found in:

$ ~/.config/.aerorc

which has the following format:

transparency={0,1} # Tells AeroColorMixer if transparency is enabled or not.
red=[0,255]        # The red component of the custom accent color.
green=[0,255]      # The green component of the custom accent color.
blue=[0,255]       # The blue component of the custom accent color.
alpha=[0,255]      # The alpha component of the custom accent color.
color=[0,17]       # Tells AeroColorMixer which color is being used. If the value is 0, then the custom accent color is used.

This configuration file is not meant to be edited by hand, as the file only directly effects AeroColorMixer, but won't actually change the accent color on the fly.

List of files modified by AeroColorMixer

When AeroColorMixer applies the accent color across the entire theme, it writes to the following files:

$ ~/.local/share/plasma/desktoptheme/Seven-Black/widgets/panel-background.svg

$ ~/.local/share/plasma/desktoptheme/Seven-Black/widgets/tooltip.svg

$ ~/.local/share/plasma/desktoptheme/Seven-Black/dialogs/background.svg

$ ~/.local/share/plasma/desktoptheme/Seven-Black/solid/dialogs/background.svg

$ ~/.emerald/theme/theme.ini

On startup, AeroColorMixer will check if these files exist on the system. If at least one SVG file is missing from the system, the program will assume the Plasma theme is not installed, and will only make changes to the Smaragd decoration instead. If the Smaragd theme is not present, then it will only write to the SVG files, and if neither are present on the system, the program will simply close.

Notes

  • AeroColorMixer has an option to enable or disable transparency when applying the accent color, however this option does not affect compositing at all. Disabling transparency in AeroColorMixer will instead make the applied accent color opaque, and blends the color with rgb(235, 235, 235), where alpha defines the percentage of the color mixing.
  • AeroColorMixer will not write to SVG files that can be found in the "opaque" and "transparent" folders of the Plasma theme.
  • When transparency is enabled, the color intensity slider won't actually make the accent color fully opaque or fully transparent when the slider is set to the minimum or maximum value.
  • Due to certain limitations, the reflection effect will not be visible at all if transparency is disabled in AeroColorMixer.*

*One idea would be to blend the accent color with the blur during rendering which would keep the reflections visible, but this would potentially break applications which rely on custom blur regions that are colored differently from the rest of the desktop (for example, Konsole).