(RUBY) Advanced Color Management

Post any examples or modules that you want to share here
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

(RUBY) Advanced Color Management

Post by tulamide »

Sooner or later we all come to the point where the color prim just isn't sufficient, because it lacks an alpha channel. That's where all of us do our own solutions (mostly a module placed behind the color output, to add an alpha channel).

I think it might be better to have a generic color mixer that all of us can use - and improve. Kind of like a community project, where everyone adds whatever seems helpful and re-uploads here.

Happy programming!

ACM r5
Scroll to page 4 for infos about version r5

Color Mixer r4 (22/June/2015)
color_mixer_r4.png
color_mixer_r4.png (56.09 KiB) Viewed 41266 times


Download reanabled here on the forums.
Attachments
Color mixer r4-2 FS3.fsm
(7.28 KiB) Downloaded 883 times
Last edited by tulamide on Sat Oct 01, 2022 10:05 pm, edited 8 times in total.
"There lies the dog buried" (German saying translated literally)
primate
Posts: 22
Joined: Thu Dec 19, 2013 10:42 pm

Re: Generic Color Mixer with alpha channel

Post by primate »

Thanks fella, sounds handy already, will happily see if I can add to it.
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Generic Color Mixer with alpha channel

Post by Perfect Human Interface »

Hi Tulamide
This was my take on it I made a short while back.
viewtopic.php?f=3&t=3416

Of course you are welcome to modify it if you think you can improve upon it. But it does what I envisioned such a tool should do.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Generic Color Mixer with alpha channel

Post by tulamide »

PHI I'm totally sorry, I completely missed that one! So we now have two solutions.

I advice that if you prefer a green solution that is far more advanced, you should use and support PHI's color designer.

The color mixer stays Ruby-based.
"There lies the dog buried" (German saying translated literally)
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Generic Color Mixer with alpha channel

Post by tulamide »

New version. See first post to download.

color mixer r2 features RGB, HSV (new) and alpha. Values get immediatly updated for the other color model, so you see the changes in realtime.

Still 100% Ruby!

Usage: Click on a box and drag to change a value. Hold shift while dragging to finetune. Double click to enter a value. Use ctrl-c and ctrl-v after double click to copy/paste.
"There lies the dog buried" (German saying translated literally)
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: (RUBY) Generic Color Mixer incl. alpha

Post by Perfect Human Interface »

Nice work. The layout is nice and clean.
I notice that the color goes to black when you set hue to 360. Also for the saturation and value parameters, I would personally prefer they were either formatted as percent or 0-255 (int). I think it just seems more consistent. Minor detail though.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: (RUBY) Generic Color Mixer incl. alpha

Post by tulamide »

Thank you PHI, especially for testing and, most importantly, reporting back!

The 360 issue will be corrected in the next version.
As for sat and val, I wasn't sure what to take. In fact, I already calculated them based on 0-100, but just divided the results by 100 again right before posting. That is because HSV is mathematically defined as hue in full circle degrees, sat and val as 0-1.
Photoshop, iirc, uses 0-100%, so I probably use that.

The next version will look less clean, I'm afraid, because it implements hex color and color wheel.
"There lies the dog buried" (German saying translated literally)
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: (RUBY) Generic Color Mixer incl. alpha

Post by tulamide »

New version r3!

See first post for image, changelog and to download. Comments very welcome.
"There lies the dog buried" (German saying translated literally)
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: (RUBY) Generic Color Mixer incl. alpha

Post by Nubeat7 »

wow! thats amazing tulamide the colorwheel made it real mature now! thanks a lot for this, i didn't test it very deeply yet but it looks like everything is working well.. straight into my toolbox :)

would be something for FS guru too, or?
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: (RUBY) Generic Color Mixer incl. alpha

Post by Nubeat7 »

just an idea to this, i see this more as a propertiestool which ( specially in vsts ) is not part of the GUI itself, to use it like this change the view to "Properties" view, add a ruby module before the output which is just a through module ("output @in" - to use ruby's persistence), and purgeable all the other modules to save filesize...
Attachments
color_mixer_r3_propertiestool.fsm
(5.56 KiB) Downloaded 1694 times
Post Reply