'use client' import TopBar from '@/components/top-bar' import { useMemo, useState } from 'react' import { Check, ChevronDown, Copy, Download, RotateCcw } from 'lucide-react' const directions = ['0° →', '45° ↗', '90° ↑', '135° ↖', '180° ←', '225° ↙', '270° ↓', '315° ↘'] export default function GradientPage() { const [start, setStart] = useState('#1769D2') const [end, setEnd] = useState('#00A8C7') const [direction, setDirection] = useState(135) const [opacity, setOpacity] = useState(100) const [type, setType] = useState<'linear' | 'radial'>('linear') const [copied, setCopied] = useState(false) const gradient = useMemo(() => type === 'linear' ? `linear-gradient(${direction}deg, ${start} 0%, ${end} 100%)` : `radial-gradient(circle, ${start} 0%, ${end} 100%)`, [direction, end, start, type]) const css = `background: ${gradient};\nopacity: ${opacity / 100};` const reset = () => { setStart('#1769D2'); setEnd('#00A8C7'); setDirection(135); setOpacity(100); setType('linear') } const copyCss = async () => { await navigator.clipboard?.writeText(css); setCopied(true); setTimeout(() => setCopied(false), 1400) } return
PNG PROCESSING / SINGLE TOOL

Gradient background.

Create a clean, export-ready gradient with precise control over color, direction and transparency.

LIVE PREVIEW
GRADIENT SETTINGSConfigure output
TOOL 01
setStart(e.target.value)} />
setEnd(e.target.value)} />
setDirection(Number(e.target.value))} />
{directions.map((item, i) => )}
setOpacity(Number(e.target.value))} />
updates automatically
OUTPUT PREVIEWgradient.png
PNG
easy-png-tools
GENERATED CSS
{css}
easy-png-tools v2.4.0gradient tool · local-only© 2024
}