File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ extension NSColor {
321321 */
322322
323323 private func toXYZComponents( ) -> ( x: CGFloat , y: CGFloat , z: CGFloat ) {
324- let srgb = toRGBAComponents ( )
324+ let srgb = toRGBAComponents ( in : . sRGB )
325325
326326 // Linearize sRGB components
327327 func linearize( _ c: CGFloat ) -> CGFloat {
@@ -401,7 +401,7 @@ extension NSColor {
401401 */
402402
403403 func toOklchComponents( ) -> ( l: CGFloat , c: CGFloat , h: CGFloat ) {
404- let srgb = toRGBAComponents ( )
404+ let srgb = toRGBAComponents ( in : . sRGB )
405405
406406 // Linearize sRGB components
407407 func linearize( _ c: CGFloat ) -> CGFloat {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class Exporter {
2424 // swiftlint:disable line_length
2525 return """
2626 \( PikaText . textColorForeground) : Hex \( foregroundHex) · RGB \( foregroundRgb) · HSB \( foregroundHsb) · HSL \( foregroundHsl) · OpenGL \( foregroundOpengl) · OKLCH \( foregroundOklch)
27- \( PikaText . textColorBackground) : Hex \( backgroundHex) · RGB \( backgroundRgb) · HSB \( backgroundHsb) · HSL \( backgroundHsl) · OpenGl \( backgroundOpengl) · OKLCH \( backgroundOklch)
27+ \( PikaText . textColorBackground) : Hex \( backgroundHex) · RGB \( backgroundRgb) · HSB \( backgroundHsb) · HSL \( backgroundHsl) · OpenGL \( backgroundOpengl) · OKLCH \( backgroundOklch)
2828 \( PikaText . textColorRatio) : \( colorContrastRatio) :1
2929 \( PikaText . textColorWCAG) : AA Large ( \( colorWCAGCompliance. ratio30 ? passMessage : failMessage) ) · AA / AAA Large ( \( colorWCAGCompliance. ratio45 ? passMessage : failMessage) ) · AAA ( \( colorWCAGCompliance. ratio70 ? passMessage : failMessage) ) · Non-text ( \( colorWCAGCompliance. ratio30 ? passMessage : failMessage) )
3030 """
Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ struct EyedropperItem: View {
8484 . onReceive ( NotificationCenter . default. publisher (
8585 for: Notification . Name ( PikaConstants . ncTriggerFormatLAB) ) )
8686 { _ in
87- colorFormat = . lab
87+ if copyFormat != . swiftUI {
88+ colorFormat = . lab
89+ }
8890 }
8991 . onReceive ( NotificationCenter . default. publisher (
9092 for: Notification . Name ( PikaConstants . ncTriggerFormatOKLCH) ) )
Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ struct KeyboardShortcutGrid: View {
176176 . frame ( height: verticalUnit)
177177
178178 KeyboardShortcutItem (
179- title: PikaText . textFormatOpenGL ,
180- event: PikaConstants . ncTriggerFormatOpenGL ,
179+ title: PikaText . textFormatLAB ,
180+ event: PikaConstants . ncTriggerFormatLAB ,
181181 keys: [ " ⌘ " , " 5 " ]
182182 )
183183 . frame ( width: horizontalUnit, height: verticalUnit)
@@ -186,8 +186,8 @@ struct KeyboardShortcutGrid: View {
186186 . frame ( height: verticalUnit)
187187
188188 KeyboardShortcutItem (
189- title: PikaText . textFormatLAB ,
190- event: PikaConstants . ncTriggerFormatLAB ,
189+ title: PikaText . textFormatOpenGL ,
190+ event: PikaConstants . ncTriggerFormatOpenGL ,
191191 keys: [ " ⌘ " , " 6 " ]
192192 )
193193 . frame ( width: horizontalUnit, height: verticalUnit)
You can’t perform that action at this time.
0 commit comments