Gimptalk - Premier Gimp Community: Color gradient along a line - Gimptalk - Premier Gimp Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Color gradient along a line

#1 User is offline   RrR 

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 05-August 12

Posted 13 August 2012 - 11:05 PM

I'm one checkbox away.....

I have a foreground and background color selected. I want to draw a line with a gradient between the two colors. All I get is a line in the foreground color.

The help talks about a checkbox "use color from gradient" but I don't have that on my tool options. I can see the sample gradient displayed there though.

What am I missing?

TIA
R
0

#2 User is offline   Solartide 

  • Member
  • PipPip
  • Group: Members
  • Posts: 417
  • Joined: 24-March 10

Posted 13 August 2012 - 11:41 PM

Can't think of a faster way, but theoretically you can draw the line, alpha to selection on the line, then color in the selection with the gradient.
0

#3 User is offline   RrR 

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 05-August 12

Posted 14 August 2012 - 12:08 AM

View PostSolartide, on 13 August 2012 - 11:41 PM, said:

Can't think of a faster way, but theoretically you can draw the line, alpha to selection on the line, then color in the selection with the gradient.


According to the help, any tool can use a gradient:

Painting with a gradient
Each of GIMP's basic painting tools allows you the option of using colors from a gradient. This enables you to create brushstrokes that change color from one end to the other.



My problem is that the tool options dialog doesn't include the checkbox to enable the gradient. Here's the help at http://docs.gimp.org...-gradients.html:

Posted Image

and here's my one:

Posted Image
0

#4 User is online   ofnuts 

  • Moderator GT
  • Group: Moderators
  • Posts: 1,300
  • Joined: 17-October 10
  • LocationLooking over your shoulder :)

Posted 14 August 2012 - 12:08 AM

View PostRrR, on 13 August 2012 - 11:05 PM, said:

I'm one checkbox away.....

I have a foreground and background color selected. I want to draw a line with a gradient between the two colors. All I get is a line in the foreground color.

The help talks about a checkbox "use color from gradient" but I don't have that on my tool options. I can see the sample gradient displayed there though.

What am I missing?

TIA
R
In 2.8 the use of a gradient is in the "brush dynamics", and there is a preset called "Gradient"
010011110110011001101110011101010111010001110011
0

#5 User is offline   RrR 

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 05-August 12

Posted 14 August 2012 - 03:36 AM

OK I'm close....

  • I created a new paint dynamic called "Color gradient along line".
  • In the Editor, I checked the Fade / Color cell
  • In the tool options, I select the pencil
  • I set the fade length to 100, units to % (I presume that means apply it over 100 of the length of the line)
  • I set the FG and BG colors I want
  • I click at the point where I want the line to start
  • I shift-click at the end point.

It works - sort of. I can't make any sense of the distance over which the transition from the FG to the BG color occurs however. I want the first pixel of the line to be the FG color, and the last pixel to be the BG color and all intermediate pixels of the line to be a linear gradient between the two colors, regardless of the length of the line.

How do I do that?
0

#6 User is offline   Solartide 

  • Member
  • PipPip
  • Group: Members
  • Posts: 417
  • Joined: 24-March 10

Posted 14 August 2012 - 04:02 AM

I still say, draw the line first, then color the line with the gradient.
0

#7 User is offline   RrR 

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 05-August 12

Posted 14 August 2012 - 04:43 AM

I'm unsure what you mean by "alpha to selection on the line"
0

#8 User is online   ofnuts 

  • Moderator GT
  • Group: Moderators
  • Posts: 1,300
  • Joined: 17-October 10
  • LocationLooking over your shoulder :)

Posted 14 August 2012 - 07:22 AM

View PostRrR, on 14 August 2012 - 04:43 AM, said:

I'm unsure what you mean by "alpha to selection on the line"
Draw the line on its own transparent layer, then "Layer/Transparency/Alpha to selection".
010011110110011001101110011101010111010001110011
0

#9 User is online   ofnuts 

  • Moderator GT
  • Group: Moderators
  • Posts: 1,300
  • Joined: 17-October 10
  • LocationLooking over your shoulder :)

Posted 14 August 2012 - 07:39 AM

View PostRrR, on 14 August 2012 - 03:36 AM, said:

OK I'm close....

  • I created a new paint dynamic called "Color gradient along line".
  • In the Editor, I checked the Fade / Color cell
  • In the tool options, I select the pencil
  • I set the fade length to 100, units to % (I presume that means apply it over 100 of the length of the line)
  • I set the FG and BG colors I want
  • I click at the point where I want the line to start
  • I shift-click at the end point.

It works - sort of. I can't make any sense of the distance over which the transition from the FG to the BG color occurs however. I want the first pixel of the line to be the FG color, and the last pixel to be the BG color and all intermediate pixels of the line to be a linear gradient between the two colors, regardless of the length of the line.

How do I do that?
It seems the "percent" here applies to the largest dimension of the picture.

Slightly painful method:

- use the Measure tool to find the distance between your two points
- set the fade length in the paintbrush Tool options to this distance
- draw the line
010011110110011001101110011101010111010001110011
0

#10 User is offline   RrR 

  • Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 05-August 12

Posted 14 August 2012 - 09:21 AM

Quote

It seems the "percent" here applies to the largest dimension of the picture.


Ahah! Makes sense.

Thanks
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic