MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / generateCssGradient

Function generateCssGradient

src/lib/gradients.ts:19–36  ·  view source on GitHub ↗
({
  shape,
  position,
  fromColor,
  viaColor,
  toColor,
}: {
  shape: string
  position: string
  fromColor: string
  viaColor?: string
  toColor: string
})

Source from the content-addressed store, hash-verified

17}
18
19export function generateCssGradient({
20 shape,
21 position,
22 fromColor,
23 viaColor,
24 toColor,
25}: {
26 shape: string
27 position: string
28 fromColor: string
29 viaColor?: string
30 toColor: string
31}): string {
32 const gradientStops = viaColor
33 ? `${fromColor}, ${viaColor}, ${toColor}`
34 : `${fromColor}, ${toColor}`
35 return `radial-gradient(${shape} at ${position}, ${gradientStops})`
36}

Callers 1

CustomGradientGeneratorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected