Hex colors got me spinning crazy lazarus / 31-LCL ---------------------------------------------------------------------- Elmug · 2011-09-09 02:42 Good people: I picked a color for use with code directly using Lzarus and it was this color numba: $00C4FFFF This shows a yellow color, like post-it notes. Now I tried to use a lighter yellow and using the web, picked a yellow color. I place it in the code and I get a light sky blue. Now, I put the $00C4FFFF in a web app that generates color from hex number and I get a bluish color in the same vecinity, turquoise like. I now got doubts on what's going on. Of course if I use only Lazarus numbers withing Lazarus all is OK. But those numbers are not valid outside, or are offset? I thought HEX numbered colors were standard. NOW I got this yellow number from Lazarus: D9FFFF and in the webpage generator this gives me a light turquoise again. As if the light cyan or turquoise and yellows are exchanged? Thanks for any replies. ---------------------------------------------------------------------- Leledumbo · 2011-09-09 03:38 I think instead of relying on the number you should use RGBToColor, endianness problem might cause the bytes to be swapped. ---------------------------------------------------------------------- Dick, from the internet · 2011-09-09 03:44 Swap the first two digits and the last two digits and give it a try; D9FFFF  -->>  FFFFD9. ---------------------------------------------------------------------- User137 · 2011-09-09 07:31 Lets see that in detail: 00C4FFFF Divided in 4 parts 00: Not sure what exactly this is for... C4: Intensity of Red FF: Intensity of Green FF: Intensity of Blue You know that full yellow should be FFFF00, and full blue a 0000FF. So whereever you first got $00C4FFFF for yellow was not RGB, but BGR. ---------------------------------------------------------------------- fabienwang · 2011-09-09 11:29 Quote from: User137 on September 09, 2011, 09:31:21 amLets see that in detail: 00C4FFFF Divided in 4 parts 00: Not sure what exactly this is for... C4: Intensity of Red FF: Intensity of Green FF: Intensity of Blue You know that full yellow should be FFFF00, and full blue a 0000FF. So whereever you first got $00C4FFFF for yellow was not RGB, but BGR. 00 is the alpha Intensity, which means the transparency of color. ---------------------------------------------------------------------- User137 · 2011-09-09 11:57 Quote from: FabienWang on September 09, 2011, 01:29:13 pm00 is the alpha Intensity, which means the transparency of color.I suppose. It's just confusing when it's used in solid colors which don't support transparency. I take it's just a placeholder most of the time. ---------------------------------------------------------------------- Elmug · 2011-09-09 17:54 Thanks for the great help, everyone. I will just use and pick colors for Lazarus use using its own color picker from now on. Since the color number was for use in a short code statement, I thought opening web pages which have color charts with hex were compatible with the Lazarus numbers. I even thought maybe the first webpage I visited was wrong. But then I got the same differences in other webpages. I still don't gather the reason for the difference, though.