color

Use this when you need a ready-to-paste CSS gradient value from 2-5 hex color stops.

Use this when you need a ready-to-paste CSS gradient value from 2-5 hex color stops. Builds a linear-gradient(...) (default; direction defaults to 'to bottom') or a radial-gradient(circle, ...). Direction accepts keywords ('to right', 'to left', 'to top', 'to bottom'), angles ('45deg', '90deg', '135deg'), or 'to <side> <side>'; it is ignored for radial, and passing type 'radial' (or direction 'radial') forces a radial gradient. Colors accept 6-digit hex with or without a leading '#' and are echoed normalized in order. Deterministic: same input, same output. Example: {colors:['#3b82f6','8b5cf6']} -> css 'linear-gradient(to bottom, #3b82f6, #8b5cf6)', type 'linear'. Radial results omit the 'direction' field.

post/v1/css_gradient

Request

  • Base URL: https://api.clean.tools
  • URL: https://api.clean.tools/v1/css_gradient
  • Auth: none declared

Request body

colorsstring[] required

2 to 5 color stops as 6-digit hex strings, with or without a leading '#', e.g. ["#3b82f6", "8b5cf6"].

type'linear' | 'radial'

Gradient type. Defaults to "linear". "radial" produces radial-gradient(circle, ...).

directionstring

Linear direction: a keyword ("to right", "to left", "to bottom", "to top"), an angle ("45deg", "135deg", "90deg"), or "to <side> <side>". Defaults to "to bottom". Ignored for radial; passing "radial" here forces a radial gradient.

Response

Structured tool result.

toolstring

Changes

No recorded changes to this operation across all 1 revision of this API.