It wasn't clear which butterflyfish you are talking about but they are somewhat similar behavior in a reef tank. As noted above, the Zoster Butterflyfish, is black, white, with a touch of yellow on its dorsal fin. A bit of yellow on the lower edge fin - not sure the name.
The Pyramid Butterflyfish, is dark gray, black, in the frontal area, face, white body, yellow/gold behind the face, upper edge of body, fins, and lower fins. White tail.
I have one of each. You asked "Are pyramid butterflies the black or yellow are they reef safe? I have a 150G 2 years old heavy coral stocking. And was wondering if they eat corals"
They are both reported to be interested in Xenia or similar looking corals. I can share in my personal experience that they do indeed eat Xenia. Likewise, corals that may look like it. Blue Cespitularia. Both my Pyramid and Zoster cleared any and all signs of either coral in my mixed reef. If it was growing behind an Acropora colony or under a rock in less light once I trimmed the corals or moved the rock they both would come and clear it within minutes. If you do a search on these butterflyfish with Xenia you will find this to be a common theme.
I have some large LPS colonies that they leave alone. Frogspawn, Torch, and Hammer. They could care less and ignore it. Few Zoa's, they leave alone. Acropora colonies, they leave alone. Leathers, same. Could care less.
Two notes: I do see all of my butterflyfish diving into my colonies and grabbing things. On the surface it appears that they are eating the polyps but in reality they are foraging. They see food, or worms, or algae, or something that catches their foraging eye, reach in, and grab it. I will see the polyp retract, and they go about their business. So the note I'm trying to raise is that fish may do something that is natural such as foraging for food and not be destructive. Second note is that all fish are different as we are - so you need to be aware of this.
TL; DR - Xenia, and corals that appear like Xenia, are more at risk. All fish are different. Have a mitigation plan in place if you are going to attempt one. They get large. Fast swimmers. Peaceful but will hold their own.