IPhone text message bubble is green but I'm using Wi-Fi?

I looked online about the different color text bubbles for IPhone and all I get the difference blue= I Message where you use Wi-Fi to text and green= Text messages used from your cell phone provider

But earlier today I was texting my friend and he's at work so he had break and all he texted me and while I was texting him back I noticed my messages were green? Is that because he probably isn't connected to Wi-Fi at his work place or is it my side or what? I'm using the internet fully on my phone so I don't know what's happening?

I don't exactly know if he has Wi-Fi there but any help would be appreciated!

Added (1). He has an IPhone too.

You've got it twisted. IMessage is blue--no matter what. Wi-Fi or data. Green is to a non-iDevice--always Wi-Fi or data. Being Wi-Fi or data has nothing to do with it. Just whether or not it's an iDevice is all that counts. Best luck.

The text bubble is green because they don't have an apple product. IMessage only works is if the person you are trying to reach has an apple product.

IMessage only works when you're texting someone else using iOS.