Gradient colors

Here's where to discuss using Stéphane Leys' very well done alternative runtime editor. If you're a control freak at runtime you have to check this out!

Gradient colors

Postby johncollett » Tue Aug 02, 2011 8:18 pm

I have followed instructions in the MPI Gradient tutorial :
'Open the OGL module and select "Gradient tool" in the "Options" popup menu.', etc.
The only colors appearing in the color selector are black through to white. What am I doing wrong? JC
User avatar
johncollett
 
Posts: 100
Joined: Sat Aug 02, 2008 2:53 pm

Re: Gradient colors

Postby S. Leys » Tue Aug 02, 2011 10:49 pm

johncollett wrote:I have followed instructions in the MPI Gradient tutorial :
'Open the OGL module and select "Gradient tool" in the "Options" popup menu.', etc.
The only colors appearing in the color selector are black through to white. What am I doing wrong? JC


This is because the saturation is 0.
You need to scroll the wheel up to have more saturation (there is a rteminder at the bottom of the palette).
The reason is that the tool picks up the current color where you click and displays the palette accordingly. So , if you click a white graphic ... Logical, isn't it ? ;-) but not very intuitive, I admit.
BTW, I would recommend that you open the tool by click an release rather than keeping the button down, it will be easier to move the wheel.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: Gradient colors

Postby johncollett » Wed Aug 03, 2011 12:44 pm

Stéphane, There is a sense of déjà vu about my attempts to use gradients and the advice you have given me. I had forgotten that I cannot set OGL gradients unless my mouse has a wheel. You told me earlier that the majority of Mac users have a mouse with a wheel. I believe you, but, curiously, I know nobody who has one.
Can I change the direction of the discussion and mention the solution I have hitherto used for setting a gradient. That was the "gradient module" - small, quick, easy, and perfect for my needs. It works, and I can still use it on my old machine. But on my new iMac (OS 10.6.8) it tells me "Never heard of that function name." It was that message which drove me to explore again the OGL possibilities, completely forgetting that in my previous attempts to go down that road I had learned the "Not without a wheel" lesson.
It is a disappointment to find that my old favorite "gradient module" is not working in the new machine.
John
User avatar
johncollett
 
Posts: 100
Joined: Sat Aug 02, 2008 2:53 pm

Re: Gradient colors

Postby johncollett » Wed Aug 03, 2011 3:56 pm

I have a clumsy but effective work-around. I open a Safari page which is empty apart from its gradient-colored background. That is set in CSS by : body {background: -webkit-gradient(linear, left top, right top, from(#5698d7), to(#d6eaff));} Then I clip a copy using command-shift-4, which is saved as a file. That file is then set as the Picturedata for a rectangle where I want the gradient to appear. JC
User avatar
johncollett
 
Posts: 100
Joined: Sat Aug 02, 2008 2:53 pm

Re: Gradient colors

Postby S. Leys » Wed Aug 03, 2011 11:34 pm

johncollett wrote:You told me earlier that the majority of Mac users have a mouse with a wheel. I believe you, but, curiously, I know nobody who has one.
It is a disappointment to find that my old favorite "gradient module" is not working in the new machine.


So, you bought a new, modern box and it didn't come with a wheel or an equivalent like dragging two fingers on the track pad ? I would be surprised.
But, after all, the last modern device on which my XFcn was tested is the mighty mouse, it is possible that it doesn't work with more modern devices.
Which mouse do you have ?
Can you scroll a window or a field without using the scrollbars and how ? If yes, does the same technique work with the OGL gradient palette ? (the mouse must be in the color selection area)

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: Gradient colors

Postby johncollett » Thu Aug 04, 2011 12:08 pm

Stéphane, I am embarrassingly dumb. I didn't even know, until I sought answers to your insightful questions, that the back of my new mouse (Bluetooth?) is a track pad. I have suddenly discovered that there are all sorts of extras, and yes, oh joy of joys, the OCL gradient palette works. I suspect I am going to need the sensitivity of a musician's fingers to be able to explore more fully and to develop the skills to use this new toy properly, but you, Stéphane, have been brilliant, as usual. Mille fois merci. JC
User avatar
johncollett
 
Posts: 100
Joined: Sat Aug 02, 2008 2:53 pm

Re: Gradient colors

Postby johncollett » Thu Aug 04, 2011 12:41 pm

Er, yes, what I've got is a Magic Mouse, and I've always wanted one of those. I feel really dumb at not having known that that was what it was, but how was I to know? If you've never seen one before, how are you expected to know what it is? Nowhere on the mouse, or anywhere else that I can see, does it actually tell me that Magic Mouse is what it is. Now that I know what it is, I can of course start to learn how to use it. JC
User avatar
johncollett
 
Posts: 100
Joined: Sat Aug 02, 2008 2:53 pm

Re: Gradient colors

Postby S. Leys » Fri Aug 05, 2011 12:28 am

johncollett wrote: oh joy of joys, the OCL gradient palette works.


LOL !
I can imagine your wonder when the colors finally appeared in the palette ;-)
The hue is the diagonal from botleft to topright (0 to 359° with 0 = red )
The light is the diagonal from topleft to botright.

If you scroll the (virtual) wheel horizontally, you can set the alpha, there is a sample at the topright of the palette showing the resulting transparency on a black and white checkerboard as you move the wheel. To actually see the transparency of the graphic, you must set its ink to alpha.
If you open the uprops module (with the grc selected), you'll see the uprops used by the OGL module. The gradcolors uprop contains the RGBA colors, one line for each vertex. You can change these colors manually (all components from 0 to 1).
If you open the script of the graphic, you'll see the ST script written automatically by the OGL module from the script in its editor field.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am


Return to Using MPI

Who is online

Users browsing this forum: No registered users and 1 guest

cron