Xfce Desktop Background Color

A curious configuration quirk appeared in Xfce while testing Slackware 15. With Xfce 4.12 in Slackware 14.2, the desktop background configuration dialog supports manually setting the color with no wallpaper images. The color can be set using individual red-green-blue (RGB) colors or an equivalent hexidecimal number.

The configuration is stored in $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml. Good luck finding those exact dialog numbers in the text-based configuration file.

The dialog RGB and hex numbers are based on an 8-bit 256 color palette. The configuration files store the numbers using 16-bit 65,535 color palette.

To find a blue color with hex 3A5E8E and RGB 58-94-142, multiply each RGB number by 257. For example, 14906-24158-36494. Those numbers will appear in xfce4-desktop.xml like this:

    <property name="color1” type="array">
      <value type="uint” value="14906"/>
      <value type="uint” value="24158"/>
      <value type="uint” value="36494"/>
      <value type="uint” value="65535"/>

The fourth number notes the numbers are using a 16-bit 65,535 color palette.

A twist in this game is the numbers no longer are stored that way with Xfce 4.16 in Slackware 15. The numbers are stored as a percentage, like this:

    <property name="rgba1” type="array">
      <value type="double” value="0.227451"/>
      <value type="double” value="0.368627"/>
      <value type="double” value="0.556863"/>
      <value type="double” value="1.000000"/>

The result is much the same in that a simple grep will not find the same numbers used in the configuration dialog.

The coup-de-grace is the GTK 3 color picker dialog in Xfce 4.16 no longer supports RGB numbers and only supports hex numbers, requiring silly conversions using other tools. GTK development continues to roll down hill.

Posted: Category: Usability Tagged: General

Next: Little Things

Previous: Slackware 15 — 9