How can I change the color of the slider in SwiftUI

My goal is to hide the SwiftUI slider line on macOS by using a clear color because I set a color gradient as a background view. But whatever color I use (.clear, .red, ...) with the accentColor or foregroundColor modifier the line does not change or can be hidden and appears still on top of the sliders background view.
Can you post a screenshot or some of your code? From what I understand you can set the opacity of your slider to clear rather than making the color clear. That might help you hide the slider.

If you want to hide just the line then you can take a look at this answer on stackOverflow: https://stackoverflow.com/questions/57101754/how-customise-slider-blue-line-in-swiftui

Overall, "SwiftUI's Slider doesn't let you customize its appearance as of Xcode 11 beta 4. " but if you want to hide the whole thing then setting the opacity to 0 should work
How can I change the color of the slider in SwiftUI
 
 
Q