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,
|
||||
|
||||
Reference in new issue
Block a user