Blackberry Z10 Rainbow color Camera error


My Blackberry Z10_Camera just shows Rainbow Colored Bars Instead of images front camera also not working it only be black when opened!
If anyone encountered the same issue please provide me the solution or suggestions!
Thanks in advance.