diff --git a/Sources/ColorfulX/AnimatedMulticolorGradientView+Speckle.swift b/Sources/ColorfulX/AnimatedMulticolorGradientView+Speckle.swift index 6f6f57f..fa4679c 100644 --- a/Sources/ColorfulX/AnimatedMulticolorGradientView+Speckle.swift +++ b/Sources/ColorfulX/AnimatedMulticolorGradientView+Speckle.swift @@ -60,6 +60,13 @@ public extension AnimatedMulticolorGradientView { } public extension AnimatedMulticolorGradientView { + + func setColors(_ preset: ColorfulPreset, animated: Bool = true, repeats: Bool = true) { + setColors(preset.colors.map { ColorVector(ColorElement($0)) }, + animated: animated, + repeats: repeats) + } + func setColors(_ colors: [ColorVector], animated: Bool = true, repeats: Bool = true) { var colors = colors if colors.isEmpty { colors.append(.init(v: .zero, space: .lab)) }