Day 001: _GREEN32 - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16) +--- Forum: Learning Resources and Archives (https://staging.qb64phoenix.com/forumdisplay.php?fid=13) +---- Forum: Keyword of the Day! (https://staging.qb64phoenix.com/forumdisplay.php?fid=49) +---- Thread: Day 001: _GREEN32 (/showthread.php?tid=1060) |
Day 001: _GREEN32 - SMcNeill - 11-06-2022 Perhaps not the greatest of keywords to start with, but that's the nature of randomness. It is what it is, so with no further ado, here's _GREEN32 explained and showcased. What is _GREEN32? It's a simple command that takes a color value and returns the green component back to you from it. When would you use it? Basically when you have a color (perhaps taken from one of the color names), and you need to know what the green value is in it. Example: Code: (Select All) Screen _NewImage(640, 480, 32) As you can see from the simple example above, _GREEN32 can be used to easily get back the green color values from whatever 32-bit color you send to it. Used in conjection with _ALPHA32, _RED32, and _BLUE32, you can quickly and easily break down a complex color value into its component parts with almost no effort on your part. RE: Day 001: _GREEN32 - Pete - 11-06-2022 And here all this time I thought _GREEN32 was a Packers quarterback signal to initiate a running back handoff to the tight end side. Learn something new every day. If I didn't also forget that, plus something old, I'd be in mighty fine shape pushing 70! Kidding aside, I hardly ever use these color keywords, but my current perception is we have grown to more than just a couple of ways to apply color in our apps. Perhaps it would also be valuable to do a piece on advantages and disadvantages for different kinds of apps when designing the best color system to employ. Pete RE: Day 001: _GREEN32 - PhilOfPerth - 11-07-2022 (11-06-2022, 02:33 PM)SMcNeill Wrote: Perhaps not the greatest of keywords to start with, but that's the nature of randomness. It is what it is, so with no further ado, here's _GREEN32 explained and showcased.Agreed, that's probably not the most sought-after function explanation we have, but it's one I had never heard of, and adds another little toy (actually, four toys) to my toybox. And if you intend, as it appears, to cover one more keyword each day/week/month, I'm keen to see the next edition! Great idea! (although I would prefer non-randomness, with ascending order of usefulness) RE: Day 001: _GREEN32 - bplus - 11-07-2022 A couple of very handy subs use _Green32 ( and red and blue and alpha), Ink~& is finding in-between colors between 2 color ranges : Code: (Select All) Sub cAnalysis (c As _Unsigned Long, outRed, outGrn, outBlu, outAlp) Used in most recent Winter Banner posts! |