Color Scripts

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Zax
Posts: 487
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Color Scripts

Post by Zax » Sat May 11, 2024 10:23 am

Hello,

As I often use colors in different formats, and each time I get confused with the conversions, I created a stack which serves as a library *. Perhaps this library will be useful to others.

* It is not a library in the "LiveCode" sense of the term, but all the functions are grouped in the stack script, so it is easy to make it a "real" library.

screen.jpg

ColorLib.livecode.zip
(6.65 KiB) Downloaded 11 times
Last edited by Zax on Sun May 12, 2024 9:22 am, edited 1 time in total.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4027
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Color Scripts

Post by bn » Sat May 11, 2024 11:13 am

Hi Zax,

Thank you for this stack. I is very nicely done and comes in handy.

Kind regards
Bernd

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

Re: Color Scripts

Post by stam » Sat May 11, 2024 12:29 pm

Thanks Zax

Also be aware that FerrusLogic released a LiveCode port of the javascript library TinyColor, and it's pretty amazing.
It does what you describe and a whole lot more. It's a scriptOnlyStack so you can just copy the text to any stack/substack script if you want to obscure it in your app.

Just so you don't need to re-invent the wheel ;)

https://github.com/Ferruslogic/TinyColor

Zax
Posts: 487
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Color Scripts

Post by Zax » Sat May 11, 2024 12:55 pm

stam wrote:
Sat May 11, 2024 12:29 pm
https://github.com/Ferruslogic/TinyColor
Thank you for the link,I didn't know about this library, it seems very complete.
Maybe too much for my needs.

Afterwards, it's a habit that I have: I prefer to create my own simple libraries whenever possible. They are thus easier to manage and do not depend on the goodwill of the developer for the necessary updates.
Furthermore, re-creating the wheel allows me to learn things.

Thanks Bernd for your comment :)

Zax
Posts: 487
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Color Scripts

Post by Zax » Sun May 12, 2024 9:23 am

The version in my initial post contained a bug, so I just edited it to put a new version.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”