DiamondGradient

Diamond-shaped gradient radiating from a center point using Manhattan distance

Props

PropTypeDefaultDescription
colorAcolor#4ffb4aColor at the center of the diamond
colorBcolor#4f1238Color at the outer edges of the diamond
stopsgradient-stops-Multi-stop gradient colors (overrides Color A / Color B when set)
centerposition{"x":0.5,"y":0.5}Center point of the diamond
sizerange0.7Extent of the gradient — controls how far Color A reaches before transitioning to Color B
rotationrange0Rotation in degrees — tilts the diamond into a rhombus
repeatrange1Number of times the gradient repeats outward. Values above 1 create concentric diamond or square bands.
roundnessrange0Morphs from a sharp diamond (0) to a square (1)
colorSpace"linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"linearColor space for color interpolation

Usage

vue
<Shader>
  <DiamondGradient />
</Shader>