--- rxvt-unicode/doc/rxvt.1.pod 2008/01/19 16:20:09 1.157 +++ rxvt-unicode/doc/rxvt.1.pod 2008/01/23 14:33:42 1.158 @@ -1455,29 +1455,51 @@ =back -=head2 ALPHA CHANNEL SUPPORT +=head2 ALPHA CHANNEL SUPPORT / TRANSPARENT COLOURS If Xft support has been compiled in and as long as Xft/Xrender/X don't get -their act together, rxvt-unicode will support C -(recommended, but B have 4 digits/component) colour specifications, -in addition to the ones provided by X, where the additional A component -specifies opacity (alpha) values. The minimum value of C<0> is completely -transparent). You can also prefix any color with C<[percent]>, where -C is a decimal percentage (0-100) that specifies the opacity of -the color, where C<0> is completely transparent and C<100> is completelxy -opaque. - -You probably need to specify B<"-depth 32">, too, and have the luck that -your X-server uses ARGB pixel layout, as X is far from just supporting -ARGB visuals out of the box, and rxvt-unicode just fudges around. +their act together, rxvt-unicode will do it's own alpha channel management: -For example, the following selects an almost completely transparent red +You can prefix any color with an opaquenes percentage enclosed in +brackets, i.e. C<[percent]>, where C is a decimal percentage +(0-100) that specifies the opacity of the color, where C<0> is completely +transparent and C<100> is completely opaque. For example, C<[50]red> is a +half-transparent red, while C<[95]#00ff00> is an almost opaque green. This +is the recommended format to specify transparency values, and works with +all ways to specify a colour. + +For complete control, rxvt-unicode also supports +C (exactly four hex digits/component) colour +specifications, where the additional C component specifies opacity +(alpha) values. The minimum value of C<0000> is completely transparent, +while C is completely opaque). The two example colours from +earlier could also be specified as C and +C. + +You probably need to specify B<"-depth 32">, too, to force a visual with +alpha channels, and have the luck that your X-server uses ARGB pixel +layout, as X is far from just supporting ARGB visuals out of the box, and +rxvt-unicode just fudges around. + +For example, the following selects an almost completely transparent black background, and an almost opaque pink foreground: - @@RXVT_NAME@@ -depth 32 -bg rgba:0000/0000/0000/aaaa -fg "[80]pink" + @@RXVT_NAME@@ -depth 32 -bg rgba:0000/0000/0000/4444 -fg "[80]pink" -I +When not using a background image, then the interpretation of the +alpha channel is up to your compositing manager (most interpret it as +transparency of course). + +When using a background pixmap or pseudo-transparency, then the background +colour will always behave as if it were completely transparent (so the +background image shows instead), regardless of how it was specified, while +other colours will either be transparent as specified (the background +image will show through) on servers supporting the RENDER extension, or +fully opaque on servers not supporting the RENDER EXTENSION. + +Please note that due to bugs in Xft, specifying alpha values might result +in garbage being displayed when the X-server does not support the RENDER +extension. =head1 ENVIRONMENT