iOS 17 UIImageView tintColor issue

Applying color picked from UIColorPickerViewController to UIImageview's tintColor(a color having kCGColorSpaceModelRGB ColorSpace),

then getting tintColor from that same UIImageView is always giving me gray color(a color having uiextendedgraycolorspace ColorSpace), this issue occured only in iOS 17

What can be the issue and please help me to solve it.

Below code I am using from which I am getting issue

Opening UIColorPickerViewController code,

let colorPicker = UIColorPickerViewController()
colorPicker.delegate = self
colorPicker.dismissDelegate = self
colorPicker.view.tag = viewTag
colorPicker.selectedColor = selectedColor ?? .black
colorPicker.supportsAlpha = false
self.delegate = presentController as? OBColorPickerDelegate
colorPicker.modalPresentationStyle = .formSheet
presentController.present(colorPicker, animated: true, completion: nil)

On dismiss applying color to imageview with below code,

let imageView = StickerImageView() // StickerImageView is custom imageview
imageView.tintColor = color

then try to get tintColor by below code in StickerImageView class,

if let color = self.tintColor {
               //Color I got here is gray only for iOS 17
}

What is the tintAdjustmentMode at the time that you are fetching the tintColor? If its .dimmed then the return value is a modified color in the gray color space.

iOS 17 UIImageView tintColor issue
 
 
Q