in Legacy/PlaygroundLogger/PlaygroundLogger/ExtensionCGColorRef.swift [45:58]
func isValid() -> Bool {
if (isPatternColor) {
return color.pattern != nil
} else {
let x = self[0] // force the components to be fetched
let c1 = (colorSpaceName != nil)
let c2 = (numComponents != nil)
let c3 = (numComponents > 0)
let c4 = (components != nil)
let c5 = (x != nil)
return c1 && c2 && c3 && c4 && c5
}
}