Alaska Software Inc. - 10 Digit Color Number -> RGB how ?
Username: Password:
AuthorTopic: 10 Digit Color Number -> RGB how ?
Jim Lee10 Digit Color Number -> RGB how ?
on Tue, 25 Jun 2019 03:32:14 +0200
hi,

under Windows 10 active Windows Titlebar & Frame have "AccentColor"

i found it in Registry under
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM\

now it have 10 Digit (Decimal) ...
i know it is HEX "BGR", not "RGB", but i only know 8 Digit (256*256*256)

so how to convert 10 Digit Decimal to RGB ?

p.s. for inactive Windows add 32 Bit DWORD "AccentColorInactive"



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com
Andreas Gehrs-Pahl
Re: 10 Digit Color Number -> RGB how ?
on Tue, 25 Jun 2019 03:07:57 -0400
Jim,

>now it have 10 Digit (Decimal) ...
>i know it is HEX "BGR", not "RGB", but i only know 8 Digit (256*256*256)

>so how to convert 10 Digit Decimal to RGB ?

Those colors are in the ABGR format (Alpha, Blue, Green, Red), so the first
8 bits are the Alpha Channel value (or transparency, from 255 [opaque] to 0 
[transparent]).

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Jim LeeRe: 10 Digit Color Number -> RGB how ?
on Tue, 25 Jun 2019 21:35:01 +0200
hi,

> Those colors are in the ABGR format (Alpha, Blue, Green, Red), so the
> first
> 8 bits are the Alpha Channel value (or transparency, from 255 [opaque] to
> 0
> [transparent]).

Thx for you Answer.

Question : how to convert "A"BGR to RGB  for Xbase++ ?



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com
Andreas Gehrs-Pahl
Re: 10 Digit Color Number -> RGB how ?
on Tue, 25 Jun 2019 17:54:25 -0400
Jim,

>Question : how to convert "A"BGR to RGB  for Xbase++ ? 

The simplest way would be: 

nRGB := AutomationTranslateColor(BAnd(0xFFFFFF, nColor), .t.)

Or the new (not deprecated) way:

nRGB := AutomationObject():TranslateColor(BAnd(0xFFFFFF, nColor), .t.)

You could also do it manually:

nRed   := BAnd(0xFF,     nColor)
nGreen := BAnd(0xFF00,   nColor)
nBlue  := BAnd(0xFF0000, nColor)
nRGB   := GraMakeRGBColor({nRed, nGreen, nBlue})

All three options work for any (A)BGR color values.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Jim LeeRe: 10 Digit Color Number -> RGB how ?
on Wed, 26 Jun 2019 02:30:28 +0200
hi,

> The simplest way would be:
>
> nRGB := AutomationTranslateColor(BAnd(0xFFFFFF, nColor), .t.)
>
> Or the new (not deprecated) way:
>
> nRGB := AutomationObject():TranslateColor(BAnd(0xFFFFFF, nColor), .t.)
>
> You could also do it manually:
>
> nRed   := BAnd(0xFF,     nColor)
> nGreen := BAnd(0xFF00,   nColor)
> nBlue  := BAnd(0xFF0000, nColor)
> nRGB   := GraMakeRGBColor({nRed, nGreen, nBlue})
>
> All three options work for any (A)BGR color values.

Thx again for help,
now i can look deeper into DWM ABGR Color



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com