I'm developing a stout recipe, but the foams have turned brown and not white.
What is the best way to achieve 100% white foam, for example a guinness?
Maybe add the toast only for cold brew?
Roasted dark malts, like black malt and chocolate malt, contribute to the colour of the beer foam. You should be using more roasted barley and less roasted barley malts.
I don't think that you can get a fully white foam head on a stout, but at least you can make it less brown.
Also see this question
If you are looking for a lovely dense head like a Guinness then you will have to be serving your beer on a Nitro gas mix 70% N2/30% CO2. The nitrogen is less soluble in the beer and therefore creates a tighter denser foam in the head, which reflects the light better giving a whiter apperance.
You will usually have a slightly off white head on most stouts, but I have also read that roasted barley can help here. Not sure where though and can't provide a reference for that.
But if you need to know more about head retention and foam, then start with The Pope of Foam himself Prof Charlie Bamforth: https://beersmith.com/blog/2011/09/28/head-retention-with-the-pope-of-foam-beersmith-podcast-23/
What is your recipe (or at least your grain bill)? What kind of brewing are you doing, extract or all-grain? What kind of fining and conditioning are you doing? Do you whirlpool when racking to the fermenter? There could be so many variables...
For example, I use a HERMS setup and do all-grain, and it recirculates the wort over the grain bed constantly, and that alone helps it to filter out lots of particulate, especially if you add some rice hulls.
I would also use some Irish Moss, which will definitely help the beer to be more clear, and then after your secondary, cold crash  it hard in a keg with pressure, with some gelatin and lager it  (conditioning, not lager yeast) for a month or so, at least, to help the particulates fall out of suspension. You should get some gunk from the gelatin off the first pint or so, but then it should be more and more clear as you suck the particulate off the bottom of the keg.
As for whirlpooling, I actually did find an experiment where the outcome was a bit counter intuitive, the beer that had the trub from the kettle was more clear.
Using all of the above, combined, you should get a very very very clear beer, which should help with the head color. Unfortunately, none of the experiments I have linked were done with stouts... perhaps you can try it, and share your results?
I don't know if you can get a white head on a dark bodied beer, but you should be able to brighten it up if your beer is clear.
As @chthon suggested, using roasted malts is adding to the head color, and using roasted barley instead should help, in theory. (details below)
The small particulate roasted malts are what contribute to dark head color. Using them, should be fine, however, in theory. But you need to let the small particulates drop out of suspension, or filter them somehow.
There are three basic types of roasted grains: chocolate malt, black patent malt and roasted barley. Roasted barley is unlike the other two grains because it is made from unmalted barley.
Raw barley goes directly into the roaster and is heated to temperatures as high as 446 ºF (230 ºC). The length of roasting time determines the darkness of the grain. This can vary from 250–600 ºL. It is during this roasting process that all the unique flavor profiles of roasted barley are produced. The most predominant characteristic is nutty and coffee-like.
Of the three dark malts, roasted barley produces the lightest colored head. This is one of the characteristics that makes roasted barley an excellent choice for brewing dry Irish stouts. 
Finally, are you using nitro or co2? Using nitro should definitely help with the head color and density, too... Without nitro you could try alginate to help with head density and retention also.