On 8/15/13 12:20 PM, Geoff Canyon wrote:
How would anyone write a command like:

on darkenObject pID
    -- darkens whatever you hand it
    get the backcolor of pID
    repeat with i = 1 to 3
       put max(0,item i of it - 20) into item i of it
    end repeat
    set the backcolor of pID to it
end darkenObject

The moment you hand that an object with a backcolor of red, or #808080,
that command dies an ugly death.

Yup, that's been an issue forever. We need a property called "the rgbColor". The inability to retrieve RGB values from an object forces ugly workarounds like this one, which requires an entire LC lesson:

<http://lessons.runrev.com/s/lessons/m/2592/l/125746-translating-a-color-name-to-an-rgb-numeric-triplet>

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to