Skip to content

Gradient Generator API

POST https://api.findutils.com/api/tools/gradient-generator/execute

Generate a CSS linear, radial, or conic gradient from colour stops (2 to 10) and an angle, or from a preset (sunset, ocean, forest, fire, purple, cool). Returns the "background: ...;" rule, the bare gradient value, and the sorted colour stops.

Request body

application/json
  • type

    string optional

    Gradient type. One of linear · radial · conic. Default "linear".

  • angle

    number optional

    Angle in degrees (0-360) for linear and conic gradients. Default 90. Default 90.

  • color_stops

    array optional

    Colour stops, 2 to 10 items: { color: "#rrggbb", position: 0-100 }. Default: #667eea at 0%, #764ba2 at 100%.

  • preset

    string optional

    Use a preset palette instead of color_stops (evenly spaced stops). One of sunset · ocean · forest · fire · purple · cool.

  • radial_shape

    string optional

    Radial only: shape. One of circle · ellipse. Default "circle".

  • radial_position

    string optional

    Radial only: position keyword or lengths, e.g. "center", "top left", "50% 50%". Default "center". Default "center".

Example arguments

Verified
{
  "type": "linear",
  "angle": 90,
  "color_stops": [
    {
      "color": "#667eea",
      "position": 0
    },
    {
      "color": "#764ba2",
      "position": 100
    }
  ]
}