Re: RGB valuesfor a color name
Message: 16 Date: Fri, 03 Jul 2009 14:05:15 -0700 From: Scott Rossi Subject: Re: RGB valuesfor a color name To: Revolution Mail List Message-ID: Content-Type: text/plain; charset="US-ASCII" Recently, James Hurley wrote: I'm surprise that mouseColor is the only function that returns the RGV values of named colors. This is the way I do it (requires an object). Starting with a graphic, for example: set the backColor of grc 1 to set the backPixel of grc 1 to the effective backPixel of grc 1 get the backcolor of grc 1 Not sure why it works, but it does for me. Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design Scott, Thanks for this. It is easier than using the pencolor, even if it does require a preexisting object. It seem particularly appropriate that an object carrying the color "WhiteSmoke", for example, should exist before being defined by its RGB values. In an effort to probe the mysteries of "backpixel" and "effective backPixel" I included a couple of extra lines of code: put the backPixel of grc tName into tempBack put the effective backPixel of grc tName into effectiveTempBack set the backPixel of grc tName to the effective backPixel of grc tName I discovered that tempBack and effectiveTempBack are the same and, in this instance, equal to 16711680. And so it is with all existential questions that they be mysterious: "In the beginning was the engine, and the engine was with Scott (Rainey)" Jim Hurley ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: RGB valuesfor a color name
- Area of Background noise approaching. - Having had a good breakfast, watered the garden, played with the cat (he's called 'Farinelli' . . . err, because .. ), talked to the tortoise (he's called 'Harold'), . . . went to "work" (why does programming with Runtime Revolution always feel like a leisure activity to me ? . . . maybe because it really is SO satisfying to get absolutely instant feedback on what one does) . . . and finally, - End of Background noise - knocked-out a version of "COLOR NAMER" that looks half decent and involves the end-user clicking in ONE place only ONCE . . . which has got to be better than the cock-eyed crap I was playing around with last night. It's here: http://mathewson.110mb.com/FILEZ/COLORNAMER.rev.zip and it is also available at the OLD revOnline; "COLOR NAMER" under 'Richmond'. Download it, play with it, tell me your feelings (No, not those feelings, the ones about the stack!) and any feedback which may be of value. Ugh, 40 degs Centigrade here with 90% humidity: a whole new angle to the phrase "boiling one's head". :) Thank God for USB fans! ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: RGB valuesfor a color name
Wonderful what a night's sleep can do! Uploaded new version of my stack to: http://mathewson.110mb.com/FILEZ/COLORNAMER.rev.zip that gets round the silly thing of having to click on a list field to set the colour and then on a coloured graphic to get the RGB values . . . mind you my solution, far from being brilliant, just shows you how sluggish I was last night at 1 o'clock in the morning: this is the code in the list field that contains the colorNames: on mouseDown get the clickText put the clickText into fld "SELECT" set the backgroundColor of fld "KNAMES" to the clickText end mouseDown on mouseUp put the mouseColor into fld "fRGB" end mouseUp there is also a button for when the fld "KNAMES" goes black and you cannot see the colorNames. I'm off to my vittles! ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: RGB valuesfor a color name
Thanks Scott! This is more usable in a commercial project than my suggestion. But I had to chuckle - "Not sure why it works, but...". Some things are like that. Best - Phil Scott Rossi wrote: Recently, James Hurley wrote: I'm surprise that mouseColor is the only function that returns the RGV values of named colors. This is the way I do it (requires an object). Starting with a graphic, for example: set the backColor of grc 1 to set the backPixel of grc 1 to the effective backPixel of grc 1 get the backcolor of grc 1 Not sure why it works, but it does for me. Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design -- Phil Davis PDS Labs Professional Software Development http://pdslabs.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: RGB valuesfor a color name
Recently, James Hurley wrote: > I'm surprise that mouseColor is the only function that returns the RGV > values of named colors. This is the way I do it (requires an object). Starting with a graphic, for example: set the backColor of grc 1 to set the backPixel of grc 1 to the effective backPixel of grc 1 get the backcolor of grc 1 Not sure why it works, but it does for me. Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: RGB valuesfor a color name
Thanks Richmond, Phil and Viktoras I'm surprise that mouseColor is the only function that returns the RGV values of named colors. Jim ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution