[AccessD] HTML color vs VBA color

John Colby jwcolby at gmail.com
Mon Jul 18 18:44:35 CDT 2022


I am reading that HTML color uses RRGGBB notation and vba uses BBGGRR
notation.

As most of us know, each octet goes from 00-FF, so FF0000 is pure blue in
VBA constant speak, but *apparently* 0000FF is pure blue in HTML speak.

Reminds me of the bad old days of Little Endian where processors named
their bits from different ends of the memory word.  Ick and eek in this case

I was using Stuart's little translator and feeding it into my HTML string
and I ended up (still not sure exactly why) with FF0000 being Blue AND
0000FF being Blue.  I suspect it has something to do with HTML color and
quite possibly a bug in my code or (gasp) the text control itself.

The following is an example of some of what I am doing with the "rich text"
text box.

This is testing so check the internet now

Display the raw HTML if we got to the internet

We got the license data from the internet parsed out

Subscribed : False

Renewal Cycle : Monthly

ExpiryDate : Jul/30/2022

We talked to the internet so check the licensing info from the internet.

clsExpirationProcessing.fGetExpiryData Complete

fclsExpirationProcessing.fExpiryDataValid Complete

We have expiry data.

According to CompanyInformation the Licensee is NOT SUBSCRIBED.

Days to expiration: 12

5 or more days to expiration.

clsExpirationProcessing.fLicenseValidSubscribed Complete

clsExpirationProcessing.fLicenseCheck Complete

The License is valid
That red NOT SUBSCRIBED comes out BLUE if I feed it the hex value for
vbBlue OR if I feed it VBRed.  I am poring over my code because ... it is
likely my code somewhere.  But dang!  The way I read it, Stuart's widget
assumes VBA endian.  But even if I swap endians it still comes out blue so
dang!
Oddly if I feed it the actual color name, it works just fine, in fact that
is how I got the red "NOT SUBSCRIBED".



-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list