Flight recorders (this is their official name and the name that’s been used within the flight safety industry or aviation) are almost always called “black boxes”. But if you ever saw one, you would have noticed that black boxes are in fact… orange!
Here’s a picture of a typical flight recorder:
So why do we call them black boxes?
The reason we call them that way is because they were originally painted black. Because black color is not easily discoverable among a plane’s debris though, they changed them to orange so that they are easily recovered after a plane accident.