Album art theme on web and iOS, roomier player bar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0c9cae5b11
commit
8e57b9d0cd
8 files changed
+116
-10
No files matched your search
@@ -33,7 +33,7 @@ private func albumColor(_ thumb: String?, dark: Bool) async -> Color? {
|
||||
}
|
||||
|
||||
/// Roughly Palette's vibrant swatch: the average hue of the most saturated, mid-bright pixels.
|
||||
private func vibrant(_ cg: CGImage) -> (CGFloat, CGFloat, CGFloat)? {
|
||||
func vibrant(_ cg: CGImage) -> (CGFloat, CGFloat, CGFloat)? {
|
||||
let n = 24
|
||||
var px = [UInt8](repeating: 0, count: n * n * 4)
|
||||
guard let ctx = CGContext(data: &px, width: n, height: n, bitsPerComponent: 8, bytesPerRow: n * 4,
|
||||
|
||||
@@ -1025,6 +1025,11 @@ struct AppearanceScreen: View {
|
||||
.padding(.vertical, 8)
|
||||
.themedRow()
|
||||
} header: { Header(text: "Accent") }
|
||||
Section {
|
||||
Toggle(isOn: $s.albumTheme) { Text("Match Album Art").foregroundStyle(c.label) }
|
||||
.tint(Color(hex: 0x34C759))
|
||||
.themedRow()
|
||||
}
|
||||
Section {
|
||||
Toggle(isOn: $s.albumColorNowPlaying) { Text("Album Colour Background").foregroundStyle(c.label) }
|
||||
.tint(Color(hex: 0x34C759))
|
||||
|
||||
Reference in new issue
Block a user