Some condos are multi-use, i.e., both residential/commercial mix, so maybe it's possible the yellow is a high leg, 277V for the common area lighting that is just there for "future development". Ask the building superintendents. They are usually filled with many great stories of advice.
You hook the new lamp exactly the way you found the old lamp
All the white wires from the old lamp went to one place. That place is where the white wire goes for the new lamp.
All the black, red and/or blue wires from the old lamp went to one place. That is where the new lamp's black wire goes.
You don't mess with anything else.
Particularly, you do not group wires by color code if they weren't before. Color codes do not have the purpose you wish they did, they don't tell which wires go together or what the wires do. Cable colors are part of manufacturing the multi-wire cables, because making all the wires the same color wouldn't work.
When you see wires bundled together, those wires are not "spares". They are already engaged in other tasks and need to stay the way you found them.
- If both blue and red wires went only to different wires on the old lamp, then pick one and cap the other.
- It's not unusual for there to be no grounding wire in old fixtures. Don't "island" a ground by attaching it to something, what you did was fine.
Oh. You messed with anything else.
Well, the good news is, given the blue wire and combinations you stated in your comment, this work is plainly in conduit, so there's a fair chance the wire colors are in fact meaningful. What a refreshing change, Usually they don't mean much.
The ground will automatically get picked up via the mounting screws when you mount up the harp. (This "via the screw" method only works on lamps and switches, not receptacles). So grounds are no worry, I love metal conduit.
The whites look OK, with one remotely possible, critical exception.
Based on what you say it's the blue wire. They were kind enough to color code the wires and it looks like blue, being a solo, is for this light.
You could also try the red, but Ihave a feeling that's for the fan.
Beyond that you are going to need to bring in a pro. Do not just repeatedly experiment. You are likely to discover combinations which do what you want, but that create a dangerous situation.
Best Answer
The novice's rule of wiring is "Not all wires in the box were put there just for your project". Lots of wires have lots of jobs to do. They don't all relate to your project. Leave them alone unless you really, really know what you are doing. Otherwise you will break the other jobs.
In particular, if wires are already bundled together, they are not "one for you and a bunch of spares". There are no spares (with rare exception). They are all doing other jobs. You can add to them, but do not separate them.
Green is ground.
White is neutral.
If you want the light to turn on and off with the switch, attach its hot wire to the single wire courteously marked "LIGHT" by the original installer.
If you want something else to happen, attach the lamp's hot wire to the yellow bundle. I suspect that will make the light run 24x7, but I don't actually know.