CSS gradient generator

A hero background, a button, a card. Pick two colours, an optional middle one and a direction, and copy a gradient that works in every browser.

How it works

  1. Type the start and the end colour, and a middle one if you like.
  2. Choose linear or radial and the angle.
  3. Press Generate and copy the CSS.

How do gradient angles work?

0deg points up, 90deg to the right, 180deg down. 135deg, top-left to bottom-right, is the most used direction.

Why does my gradient look grey in the middle?

Two opposite colours mix to grey halfway. Add a middle colour between them, or pick neighbours on the colour wheel.

Does it work in all browsers?

Yes. Unprefixed linear-gradient and radial-gradient have been supported by every current browser for years.

Use it from ChatGPT, Claude or your own agent

This tool is also a function an AI agent can call for you. It needs the same free account as this page, nothing else.

Fields

  • from (text, required): Start colour
  • via (text, optional): Middle colour. Optional
  • to (text, required): End colour
  • type ("linear" | "radial", optional): Type
  • angle (integer, optional): Angle (degrees)

A call that works

POST https://orkosi.com/api/v1/public/tools/gradient-generator/run
Authorization: Bearer <api_key>

{
  "input": {
    "from": "#0052FF",
    "to": "#7C3AED",
    "type": "linear",
    "angle": 135
  }
}

Need an account? One request creates it and answers the key: POST https://orkosi.com/api/v1/public/signup. In Claude or ChatGPT, add the Orkosi connector and sign in: https://orkosi.com/api/v1/public/mcp.

This tool as Markdown · Connect an AI assistant