No need to reinvent that particular wheel when the awesome guys at FerrusLogic has had us covered for years: https://github.com/Ferruslogic/TinyColor
/Andreas ons 7 aug. 2024 kl. 18:18 skrev Craig Newman via use-livecode < use-livecode@lists.runrev.com>: > Hi. > > If Paul’s post is not viable, I don’t think there is any native gadget > (like “convert”) that applies to the different color formats. Fairly simple > to roll your own, depending on how comprehensive you need it. > > Craig > > > On Aug 7, 2024, at 12:04 PM, Paul Dupuis via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > You have RGB colors (0-255,0-255,0-255), Hex colors (#000000 - #FFFFFF) > and named colors ("blue") in Livecode > > > > Any built in way (via some trick) to convert between color value formats? > > > > I can always write a routine to convert RGB to Hex and Hex to RGB, but I > am wondering if there is some clever trick in Livecode to do this. > > > > For example: answer color -- returns RGB, but the htmlText of a line > wants <p bgcolor="#NNNNNN"> </p> > > > > Thanks in advance, > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode