# Gradient Border Generator > A free CSS gradient border generator that runs in the browser: give your brand colour and get a subtle gradient border with rounded corners for a card, button, active tab or hero panel, as CSS, HTML or Tailwind classes, with separate stops for dark and light surfaces and a check that the edge is visible but quiet. URL: https://gradient-border-generator.skillsafe.ai/ API: https://gradient-border-generator.skillsafe.ai/api.html ## What it does (free, in the browser, nothing uploaded) - Reads a colour as a hex code (#abc, #aabbcc), rgb(), hsl() or a common colour name. - Builds three stops as the source skill recommends: a neutral highlight, the brand colour, a neutral fade; 135 degrees for cards and hero panels, 160 for buttons and tabs; 1 px (2 px for hero panels). - Tunes the brand opacity per surface (dark #0b0f19 and light #ffffff by default, both editable) so the brand stop reaches a target contrast against the surface: Subtle 1.3:1, Medium 1.6:1, Strong 2.1:1. - Two patterns: a solid fill (transparent border, padding-box surface and border-box gradient backgrounds) or "keep my background" (a ::before ring with padding equal to the width, cut out with mask / -webkit-mask-composite). Corners keep the element's border-radius. - "Dark and light" writes separate stops and switches them with prefers-color-scheme; the light version uses dark ink (#0f172a) in place of white. - Buttons and active tabs get a :focus-visible outline in a brand tone with at least 3:1 contrast against the surface; optional hover/focus brightening. - Exports: CSS (custom properties --gb-1..n), HTML, Tailwind arbitrary-property classes (dark: variant for the dark stops), and a demo .html page. - Checks: strongest stop under 1.15:1 (nearly invisible) or over 3.2:1 (loud) against each surface, more than one stop at 40% opacity or more, full-saturation neon at 50% opacity or more, stops spanning more than 90 degrees of hue (rainbow), brand colour too close to the surface, widths over 2 px. ## Optional AI step (signed in, metered, model llm-default) From a short description of the visitor's site, suggests two or three styles in the visitor's colour: angle, width, corner radius and 2-4 colour stops per surface. The page measures every style with the same checks and refuses any that is invisible, loud, neon, a rainbow, out of range, or brings in a hue the visitor did not give (only the brand hue within 25 degrees, neutral tones, or a #rrggbb code written in the description). Input fields (all strings): `task` ("suggest"), `brief` (optional, at most 300 characters), `brand` (#rrggbb), `theme` ("dark", "light" or "both"), `element` ("card", "button", "tab" or "hero"), `facts` (JSON text: surfaces, brand_alpha {visible_from, loud_from} per theme, current border, flags). Reply: one JSON object {task, variants[{name, why, angle, width, radius, dark?[{color, alpha, at?}], light?[...]}], summary}. ## Source Adapted from the agent skill @mengto/css-border-gradient (https://skillsafe.ai/skill/@mengto/css-border-gradient), from mengto/skills, MIT licence.