[ANN] TinyColor for LiveCode

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

[ANN] TinyColor for LiveCode

Post by andresdt » Fri Jan 21, 2022 5:08 pm

TinyColor is a popular JavaScript library. With a 4.1k star rating on GitHub. https://github.com/bgrins/TinyColor
Image
We now have a version of this popular library for LiveCode. Written 100% in LiveCodeScript. You can download the code at https://github.com/Ferruslogic/TinyColo ... ag/v1.0.0b

If you find any bugs or have any suggestions for improvement, you can create a new issue here https://github.com/Ferruslogic/TinyColor/issues/new

stam
Posts: 2680
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: [ANN] TinyColor for LiveCode

Post by stam » Sat Jan 22, 2022 4:38 pm

Fascinating! And seems like this could be extremely useful, thank you @andresdt!

I'll get around to testing this at some point... just from a quick look at the source code on GitHub, it looks like all JSON inputs and outputs in TinyColor are LC arrays in TinyColor For Livecode? is that right?

It looks like LC color names are catered for as well - for example it should understand strings like "AntiqueWhite3", is that right?

Does chaining work?
ie. how would you express this in LC?

Code: Select all

tinycolor("red").lighten().desaturate().toHexString() // "#f53d3d"
Looks like a massive amount of work and a stellar effort, well done guys - look forward to using this
Stam

stam
Posts: 2680
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: [ANN] TinyColor for LiveCode

Post by stam » Sat Jan 22, 2022 5:18 pm

Actually to answer my own questions it seems everything is indeed in LC array format and the color names are recognised -- amazing!

Just on the demo included: on first opening this, the various colour variations (lighten, darken etc) show correctly, but inputting any colour into the field makes most of them disappear as in:
demo.jpg
Lighten, saturate, greyscale, darken and desaturate all disappear...
All colours in the triad/tetrad etc except base colour turn black
As a very minor issue, some text is truncated with no option to scroll...

andresdt
Posts: 146
Joined: Fri Aug 16, 2019 7:51 pm

Re: [ANN] TinyColor for LiveCode

Post by andresdt » Tue Jan 25, 2022 1:05 am

hello @Stam, we have solved all the problems that we have found. The demo is already working

https://github.com/Ferruslogic/TinyColo ... tag/v1.0.0

Post Reply

Return to “Announcements”