Clear water is colored blue mainly due to absorption of red wavelengths more strongly than blue, an effect even seen in swimming pools. Secondarily there is scattering of blue by the same mechanism that colors the sky blue.
Ocean water containing phytoplankton will be some shade of green due to chlorophyll. Near the shore ocean color is also influenced by runoff, tide-induced resuspension of fine particles from the bottom, and a number of other substances that may change the water's color.
This information comes from Wikipedia articles "Ocean color" and "Color of water.