As others have said, it sounds like a type of migraine aura that those of us who suffer migraines may experience.
BUT
Saying that, if you've not had a migraine before and even if you have, if this is a new experience, you should get it checked out medically. There is a *small* chance that it isn't a straightforward migraine experience but something a tad more serious. Don't wish to scare you - truly - but you should get such things checked to make sure it isn't the very small risk of something serious.
Example: my mother (a migraineur) developed visual disturbances she'd not experienced before in relation to her migraines. She went to her doc who initially pooh-pooh'd it but she insisted it was different. She got a referral to a local specialist and it turned out she was suffering minor strokes. She was put on to medication for that and had her specs altered to deal with the visual imagery and she was fine for many a long year afterwards. On the plus side it meant that the minor strokes were picked up on and dealt with in a way to reduce her risk of having a major stroke.
Suffering migaines myself - I now know to make sure any changes in my migraine pattern are something I get checked out. I do this not to scare myself, but to stay healthy, if you see what I mean.