Skip to content

nthState/ChromaticAberration

Repository files navigation

Chris's SwiftUI Chromatic Aberration

A View Modifier to shift colour

Overview

import SwiftUI
import ChromaticAberration~

struct ExampleSwiftUIView {}

extension ExampleSwiftUIView: View {
  
  var body: some View {
    content
      .padding(4)
  }
  
  var content: some View {
    HStack {
      Image("craig", bundle: Bundle.module)
      Text("Craig")
        .foregroundColor(Color.red)
    }
    .padding(10)
    .background(Color.green)
    .chromaticAberration(red: CGPoint(x: 10, y: 4))
  }
  
}

Before After
Before After

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published