Skip to content

Commit

Permalink
Merge pull request #12 from linhay/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakr233 authored Aug 29, 2024
2 parents 4425033 + 2a5f7ef commit 213ea47
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) }
Expand Down

0 comments on commit 213ea47

Please sign in to comment.