IfcMaterial retain information about «real world» material with their thermal, energy, optical, mechanical etc… properties.
Visible color in authoring software might be related to IfcStyle rather than material. Styles are more a virtual ways to display objects in authoring software including line style (border, axis etc…) a color representing what kind of fluid flows in a duct or a pipe etc…
Following diagram shows how materials are related to their object. Any child of IfcObjectDefinition as IfcWall, IfcDuct etc… can get a material assigned this way :
IFC materials can be set using different ways depending on complexity and shape.
Material Constituent Set
Material Layer Set
Material Profile Set
Any component with a single material with do not require layer, constituent or profile info can be applied directly. A stirrup or a pipe might have their material assigned this way.