This is an important question to discuss with your doctor
You are correct that, generally speaking, bruises start black or blue and then, as the body digests the blood away, they gradually fade to a yellowish or brownish color.
However, it is also quite common to have bruises "evolve" after an injury
, especially in the skin below the eyes. The initial blow or other accident will break the blood vessels and set up the future bruise to develop. However, since the blood leakage out of the damaged vessels into the tissue ("bruising") is slow, you may first just have some swelling, which might look yellow or red. Subsequently, when enough blood has accumulated under the skin, you will start to see the blue or black color emerge. I suspect this is what happened in your case.
If you have significant pain, swelling, or any disturbance in your vision, you should definitely go see your primary care doctor
about this injury. Most importantly, they can make sure there has been no damage to the eye itself. Additionally, they can give you advice about which remedies you can use, such as ice packs or anti inflammatory medication, to help decrease pain and inflammation and speed healing.
See your doctor as soon as you can!