The random seed thing has already been explained, but I can help you with the colours of the slices and the legend.
The plot function for a SOM object uses a colour palette, which depends on the number of classes/columns you have in your matrix. It creates a range of colours, based on what we could call "major colours".
In your example the major colours must be "red", "yellow", "green", "blue" and "purple", and the palette automatically add matching colours to fill in the spaces between these "major colours".
You can choose to use another palette thanks to the argument "palette.name", either by using a pre-defined palette function such as "rainbow()", "topo.colors()", "cm.colors()"... or by creating your own range of major colours, using colorRampPalette().
Here is an example:
If you want the colours to go from pink to yellow, then blue and finally brown in your SOM graph, you could write this :
data("wines")
#You have to define a new palette function, that can create the colour gradient #depending on the number of classes you want to represent
PALETTE.WINES <- colorRampPalette(c("pink", "yellow", "blue", "brown"))
som.wines <- som(scale(wines), grid = somgrid(4, 4, "hexagonal"))
#Finally remember to fill in the argument "palette.name" with your new palette function
plot(som.wines, main = "Wine data", palette.name=PALETTE.WINES)
And here you are! :) Wine SOM with new colour range
If you want to affect a special colour to every single column, you can enter as many major colours as you you want. In the previous example, if you only have four classe, one will be in pink, the second in yellow, the third in blue and the last in brown, with no gradient.
I hope this will be helpful for all the people who still want to change the colours. I highly recommend you to look for more information by looking for the presentation of Earl F. Glynn, on the use of color in R.
You can also see this link to have a bit more details : https://www.r-bloggers.com/color-palettes-in-r/