Received: from eggs.gnu.org ([208.118.235.92]:59028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIXRV-0002U4-77 for qemu-devel@nongnu.org; Thu, 21 Mar 2013 00:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIXRU-0005Ey-Aa for qemu-devel@nongnu.org; Thu, 21 Mar 2013 00:49:33 -0400 Received: from smtp.nfit.au.dk ([130.225.17.180]:48697 helo=nysmtp.nfit.au.dk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIXRU-0005Ej-3n for qemu-devel@nongnu.org; Thu, 21 Mar 2013 00:49:32 -0400 From: sandmann@cs.au.dk (=?utf-8?Q?S=C3=B8ren?= Sandmann) References: <1363772625-9182-1-git-send-email-kraxel@redhat.com> <1363772625-9182-8-git-send-email-kraxel@redhat.com> Date: Thu, 21 Mar 2013 05:49:29 +0100 In-Reply-To: <1363772625-9182-8-git-send-email-kraxel@redhat.com> (Gerd Hoffmann's message of "Wed, 20 Mar 2013 10:43:29 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 07/23] console: switch color_table_rgb to pixman_color_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Anthony Liguori , qemu-devel@nongnu.org Gerd Hoffmann writes: > @@ -255,7 +250,10 @@ enum color_names { > }; > #endif >=20=20 > -static const uint32_t color_table_rgb[2][8] =3D { > +#define QEMU_RGB(r, g, b) \ > + { .red =3D r << 8, .green =3D g << 8, .blue =3D b << 8, .alpha =3D 0= } Are you sure you don't want alpha =3D 0xffff here? When using alpha =3D 0 with the OVER operator, the result will be that the color is added to the background rather than composited with it. For example if the foreground color is pink: 0xff00ff and the background is green: 0x00ff00, the result will be white (0xff00ff + 0x00ff00 =3D 0xffffff) text on green background. With alpha =3D 0xffff, you would get pink text on green background. S=C3=B8ren