The decks were not originally all painted green, Semtex came in grey and other colours but for some reason the RN standardised on green after WW2 until the 1970s when they started painting the decks grey.
The turret tops were not walking surfaces so were usually painted the same as the upperworks. However in earlier years, turret tops of capital ships were often painted different colours as a means of identification from the air. For example on USS Arizona three of the four turrets had red roofs.
There is lots of stuff about warship colours online if you do a Google search.
Colin