Sounds like a loose cable from laptop to lid.
If you have a monitor, try plugging it in. If problem persists it would suggest the graphics chip is failing but if it is OK on the external monitor, it confirms it is a loose cable.
How to watch the World Cup for free on TV and online
Best of the Grad Shows 2018: Middlesex University art, illustration and graphic design
Best Mac tips, tricks and timesavers
Comment identifier le modèle de son iPad ?