Try to add override class func transformedValueClass() to final class ColorValueTransformer. It works for me.
override class func transformedValueClass() -> AnyClass {
return UIColor.self
}
https://developer.apple.com/documentation/foundation/valuetransformer