In common with many paint programs, Gimp has a gradient tool, which makes a field of pixels that change at a constant rate from one color to another. They run along a piece of geometry such as a line segment (linear gradients), but variants along circles (radial) and other flavors are common.
G'MIC employs “gradient” for a related command which finds tonal variations in an image and generates difference maps. (see -gradient). This usually sends new folk off to find the “real” G'MIC gradient command, which, in so many words, they won't find.
That's because there is More Than One Way To Do Gradients in G'MIC and the various methods employ a variety of commands. We'll call these gradient-like things ramps, however, to avoid confusion with G'MIC's notion of a gradient, borrowing the term from procedural texturing which use such as pattern parameters.
Some common ramp recipes are on the following pages, these more or less equivalent to Gimp's linear offerings. Visualizations are on the left and the pertinent G'MIC commands (snippets) are on the right. These snippets are meant to be copied and pasted into a UNIX Bourne or Bash shell or similar, a trick that (probably) won't work with a Windows command shell. For the Redmond bereft, the Gimp-G'MIC plugin furnishes access to the G'MIC command line. Look for the “Custom Code” filters in the “Various” set. If you do use the Custom Code filter in Gimp-G'MIC, you don't have to transcribe the '\' character at the end of the lines in our examples; they were put there so that the UNIX shell received what appeared to be one long line.
If you are going to use these examples with a paint program like Gimp or Krita, be sure to finish up with a -normalize command (-normalize 0,255 for eight bit, -normalize 0,65535 for sixteen bit channels).
Nothing Preceding | Input and Fill |