That's controlled in the registry. You'd have to look under HKCR:\.<fileextension> see what that points to in the "(Default)" property and go to that in HKCR:\PointedToValue and then look for a registry property called Icon or Default Icon
By default, these icons should show the icon of the application used to open them. HTML files, for instance, will show the icon for the browser you use to run them. By right-clicking one HTML file, selecting "Open With" and then "Choose Another App", you can change the icon for all HTML files back to Firefox by clicking Firefox and checking the "Always use this app to open HTML files" box.
After doing this or using the registry method mentioned above, be sure to refresh File Explorer to see if the icons have changed by right-clicking outside of the files and clicking "Refresh"