Page 1 of 1

Gradient howto

Posted: 2008-12-23T03:32:01-07:00
by vuthecuong
Hi,
I have a couple of questions for you:
Below command generates gradient for text (not for background) for me.
convert -size 850x80 gradient:white-blue \
-font HoboBT-Regular -pointsize 70 -tile gradient:blue-red \
-annotate +10+65 'Add Fonts to ImageMagick!' gradients.jpg

1) About "gradient:" prefix operator, (ex: gradient:white-blue),
which command allow me how can I retrieve information about how many operator begins with gradient: prefix
and what are they?

2) Above command example have gradient:blue-red which combines 2 colors (blue and red),
Is there any operator allowing me to combine 3 colors or more on generating gradient for text?
If no such operator, what is simplest way to generate gradient consists of 3 colors for text?

3) Could you show me some commands to generate gradient consists of 3 colors for text?
I’ll start learning from that.
Please help me. I need your help.
Many thanks and best regards,

Re: Gradient howto

Posted: 2008-12-23T03:44:14-07:00
by vuthecuong
Hi,
>1) About "gradient:" prefix operator, (ex: gradient:white-blue),
>which command allow me how can I retrieve information about how many operator begins with gradient: prefix
>and what are they?
Nevermind. I found that color combination whatever color I need.
Regards,

Re: Gradient howto

Posted: 2008-12-23T20:34:20-07:00
by anthony
In mail response to the original question...
1) About "gradient:" prefix operator, (ex: gradient:white-blue),

which command allow me how can I retrieve information about how many operator begins with gradient: prefix

and what are they?
The "gradient:" is a reference to a image format coder.
These are modules which are generally used to read specific file formats such as PNG: JPG: and MIFF:

Some special formats return internal images such as
rose: logo: granite:

However there are some special ones too such as tile:{image} which reads the image and tiles it into a image if "-size" dimentions. And pattern: which is another tiler but of a seperate set of built in tile patterns.

Some coders read from special sources such as X: which does a screen snapshot under user control.

Also there are 'fake' formats that just create the images mathematically.
These include

gradient: plasma: xc:

For a list and references to information on these look at
Offical page of formats (coders)
http://www.imagemagick.org/script/formats.php
IM Examples pages
http://www.imagemagick.org/Usage/files/
http://www.imagemagick.org/Usage/formats/
http://www.imagemagick.org/Usage/canvas/
and a index at...
http://www.imagemagick.org/Usage/reference.html#formats
2) Above command example have gradient:blue-red which combines 2 colors (blue and red),

Is there any operator allowing me to combine 3 colors or more on generating gradient for text?

If no such operator, what is simplest way to generate gradient consists of 3 colors for text?
generate an image (any image) say using xc:
Then use -sparse-colors operator or recolor it with complex gradient
from user supplied color points
http://www.imagemagick.org/Usage/canvas/#sparse-color
3) Could you show me some commands to generate gradient consists of 3 colors for text?
Generate your text as a black and white image, and combine it with
color images...

See IM Examples, Text to Image Handling, Annotate
http://www.imagemagick.org/Usage/text/#annotate
and look for "Coloring a Gray-scale Text Image"

That will give you a starting point and references to more detail
about using the text as a color template combining color images.