Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

(RUBY) Advanced Color Management

Post any examples or modules that you want to share here

Re: (RUBY) Generic Color Mixer incl. alpha

Postby martinvicanek » Sun Jun 21, 2015 2:53 pm

Cool, much like the Photoshop color picker! 8-)
Two suggestions:
1. Click&drag on the spectrum is OK, however you can't just click right on the new selection as you can in the color wheel (well, it's more a color square actually ;) ) Would that be possible to add?
2. Is it possible to send a trigger to the output so whatever is connected to it will be updated every time you select a new color? (Dunno if that would be a reverse trigger because yellow connections work backwards)
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: (RUBY) Generic Color Mixer incl. alpha

Postby tulamide » Mon Jun 22, 2015 8:58 am

Nubeat7 wrote: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...

I even wanted it to have a button to switch between properties and panel view, but Ruby doesn't allow that and I wanted it to stay 100% Ruby. I will support two versions from now on. (btw, for the panel view version I thought about using a sample and hold after the color mixer, so that the module could be set to purgable.
It is something for GURU, I just wanted to wait until all features are implemented. As soon as color palette (to store colors) is implemented I run out of ideas, so I think I'll transfer it to GURU then.

martinvicanek wrote:Cool, much like the Photoshop color picker! 8-)
Two suggestions:
1. Click&drag on the spectrum is OK, however you can't just click right on the new selection as you can in the color wheel (well, it's more a color square actually ;) ) Would that be possible to add?
2. Is it possible to send a trigger to the output so whatever is connected to it will be updated every time you select a new color? (Dunno if that would be a reverse trigger because yellow connections work backwards)

1. Done. Will be in the next version.
2. It already sends a trigger each time the color is changed (you may want to add a trigger counter to check for this).

EDIT: Added a schematic showing the triggering in action.
Attachments
color_mixer_trigger_example.fsm
(5.38 KiB) Downloaded 1377 times
"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

Postby tulamide » Mon Jun 22, 2015 9:24 am

Also, if there are more ideas - they are more than welcome. If you are not experienced enough in Ruby, just tell your wish here. Maybe it can be realized! If nothing gets posted here, I assume it being the perfect Ruby-based Color Mixer :P
"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

Postby tulamide » Mon Jun 22, 2015 10:23 pm

New version r4!

A color palette to store colors added. Also, it is now hosted on Flowstone GURU: http://flowstone.guru/downloads/generic-color-mixer/
"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

Postby Perfect Human Interface » Wed Jun 24, 2015 12:04 am

There's always HSL color format if you could figure it out. Not sure if it would be worth all the trouble, but I find it useful for tweaking existing colors to lighter or darker as I think it simulates "colored light" effects a little better.

Speaking of which, I highly recommend adding an input to set the editor to an existing color.

If possible I would also add a way to open the Windows color picker, just for convenience sake, perhaps when clicking on the small color preview box.

I usually prefer knobs as a visual readout of a setting over the tumbler-readout style control, but seeing the indicator move across the gradient square makes up for it. I quite like that.

The hex setting can be "scrolled" with the mouse like the others, but the effect doesn't seem to be useful. It just looks rather glitchy. Not sure if there is meant to be functionality there.

As feedback on the color banks, simplicity is good but I find it too easy to accidentally click the wrong mouse button, which (to use hyperbole) could be disasterous. This is why in my design I used individual "set" and "get" buttons, even moved them apart so they couldn't be misclicked. It takes more UI space but I find this sort of thing necessary.

I also notice that the Hue value reads out to one decimal place. Would that not be an integer value as well? Maybe it's not, I just prefer working with integer values whenever possible with these things as they're a lot less "messy" and easier to keep track of and type in. Not a huge deal.

I believe you can simply attach a last-switched module before the output to hold the color value even if everything else is purged.

Just my nitpicks. ;) I think it's quite good though, nice work.
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: (RUBY) Generic Color Mixer incl. alpha

Postby Nubeat7 » Wed Jun 24, 2015 3:00 pm

very neat solution with the colorpalette tulamide, thank you!

as it has a palette now it would be great to:

1. have an option to make the palette bigger maybe 6, 12,18

2. to provide a simple color selection module where you can choose from the palette

so you can use it as a central colorpalette creator and select the colors whereever you need them,
i did a fast mod which includes the palette size selection and a colorselector tool as long it is used like in the example
the main module can be purgeabled, its just a fast mod hope there are no bugs inside, and maybe it could be done different too..
Attachments
Generic-Color-Mixernubeat.fsm
(7.01 KiB) Downloaded 1382 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: (RUBY) Generic Color Mixer incl. alpha

Postby tulamide » Wed Jun 24, 2015 6:43 pm

Thank you once again, PHI :)

Perfect Human Interface wrote:There's always HSL color format if you could figure it out. Not sure if it would be worth all the trouble, but I find it useful for tweaking existing colors to lighter or darker as I think it simulates "colored light" effects a little better.
As long as I find any code examples in any language I can implement whatever color model there is (YMCK, YUV, HSL, HSI,...). But it's also a question of real need. I will think about it, but I don't want the color mixer to be bloated. Btw. HSL is pretty easy to get from HSV. V is [r, g, b].max while L is ([r,g,b].max + [r,g,b].min) / 2 (with r, g and b normalized)

Perfect Human Interface wrote:If possible I would also add a way to open the Windows color picker, just for convenience sake, perhaps when clicking on the small color preview box.
The intention for the color mixer is to be a replacement of the windows color picker, so I won't add a link to it.

Perfect Human Interface wrote:The hex setting can be "scrolled" with the mouse like the others, but the effect doesn't seem to be useful. It just looks rather glitchy. Not sure if there is meant to be functionality there.
I already talked about it, so I just quote myself :mrgreen: :
tulamide wrote:
    NEW Hex box, shows color as a hex number in the format #rrggbb
    • - Click'n'drag supported, although it doesn't make much sense. However, using it to quickly get a random color may be a convenience.
    • - Doubleclick supported. Enter, copy or paste a hex number (for example from the internet)


Perfect Human Interface wrote:I also notice that the Hue value reads out to one decimal place. Would that not be an integer value as well? Maybe it's not, I just prefer working with integer values whenever possible with these things as they're a lot less "messy" and easier to keep track of and type in. Not a huge deal.
If you restrict yourself to hue only as an integer, you will miss a lot of colors. In fact, there's already a huge inaccuracy by restricting it to one decimal place. Colors are not so willing to sit on exact integer degrees ;)
"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

Postby tulamide » Wed Jun 24, 2015 6:52 pm

Nubeat7 wrote:very neat solution with the colorpalette tulamide, thank you!

as it has a palette now it would be great to:

1. have an option to make the palette bigger maybe 6, 12,18

2. to provide a simple color selection module where you can choose from the palette

so you can use it as a central colorpalette creator and select the colors whereever you need them,
i did a fast mod which includes the palette size selection and a colorselector tool as long it is used like in the example
the main module can be purgeabled, its just a fast mod hope there are no bugs inside, and maybe it could be done different too..

Wonderful! This is such a nice idea! Having a central place on the top layer to manage the colors, while just selecting one from a palette in lower layers. That will make it so easy to keep track of the coloring even in very large projects. And later changes are just a matter of seconds. If you don't mind, I will implement it and work out a way to have more palette options regarding this.
"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

Postby Perfect Human Interface » Wed Jun 24, 2015 11:01 pm

tulamide wrote:Click'n'drag supported, although it doesn't make much sense. However, using it to quickly get a random color may be a convenience.

I could understand that, however, it doesn't seem to be random at all, rather it seems to only give you many shades of either light blue (180 hue) or red (0 hue).

If you restrict yourself to hue only as an integer, you will miss a lot of colors. In fact, there's already a huge inaccuracy by restricting it to one decimal place. Colors are not so willing to sit on exact integer degrees ;)

Well, 255 * 255 * 360 = 23,409,000 possible colors, for example. As a developer and a human that's probably already a good bit too many. Having "every" color available is important for things like drawing gradients, but "color picking" is an entirely different thing. If I can't perceive the difference between two colors I would much rather they were one color!

I like Nubeat's concept too. Since you could tweak the color scheme of your whole schematic that way I would want a way to save and recall different working palettes though. For example I would want to copy the existing palette, tweak it, and then compare and if necessary revert to the original.

If you could add the inputs to set the colors like I suggested then you could perhaps accomplish this by loading a separate color mixer module and setting the new one by connecting it to the old one, though you'd then have to manage conflicts with the wireless links (maybe just an on/off switch).
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: (RUBY) Generic Color Mixer incl. alpha

Postby tulamide » Thu Jun 25, 2015 1:01 am

Perfect Human Interface wrote:I could understand that, however, it doesn't seem to be random at all, rather it seems to only give you many shades of either light blue (180 hue) or red (0 hue).
What color you get out depends on where you start from, and if you use 'shift' or not. It will always be one of two hues in different shades.
Remember, this is just an offer, no one needs to use it :)

Perfect Human Interface wrote:Well, 255 * 255 * 360 = 23,409,000 possible colors, for example. As a developer and a human that's probably already a good bit too many. Having "every" color available is important for things like drawing gradients, but "color picking" is an entirely different thing. If I can't perceive the difference between two colors I would much rather they were one color!
There's a misunderstanding of the color concept. Since we are on a monitor, we always stay in the RGB color space. The total number of colors is the product of all 3 color channels. A channel has 256 variants (0-255), so the total number of colors in the 8-bit-RGB is 256*256*256 = 16,777,216. HSV color space is much more accurate than RGB with its only 256 steps per channel, so can easily map them. But of course, they don't fit on integer steps of hue. For example,
Code: Select all
rgb 62,24,160
can be mapped to
Code: Select all
hsv 256.8,0.85,0.627
The real values have a lot more digits, so this is already just an approximation. If we now take 256.8 and make it an int, it would be 256. But
Code: Select all
hsv 256,0.85,0.627
represents
Code: Select all
rgb 60,24,160
And if we round hue instead of just converting to int, we would get 257. But
Code: Select all
hsv 257,0.85,0.627
represents
Code: Select all
rgb 63,24,160
As a result, by restricting hue to integers, we wouldn't be able to map all rgb colors. We already lost at least 3 colors just in this example. And this is important because there's not only human eyes. What if you trace a certain color? The computer will look for rgb 62..., but since hue was restricted, never finds it.

Perfect Human Interface wrote:I like Nubeat's concept too. Since you could tweak the color scheme of your whole schematic that way I would want a way to save and recall different working palettes though. For example I would want to copy the existing palette, tweak it, and then compare and if necessary revert to the original.
Don't forget that the color palette is bound to the schematic it's in. It's persistent per project, so to say. But I also thought in the direction of grouping colors. Let's see what I can come up with!
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

PreviousNext

Return to User Examples

Who is online

Users browsing this forum: No registered users and 18 guests