Refactor hasRGB -> masked