I have a texture which has mainly green pixels representing land and some clusters of blue pixels that represent water. How can about generating colliders for the water clusters?
If you’re asking how to manipulate and consider pixels in a texture, hie thee to the Texture2D reference and look for things like GetPixel() and GetPixels()
As far as doing the work, floodfill can be a good way to consider all pixels of a given (or near a given) color.
The floodfill results would then need to be coalesced into larger polygon collider edges before being fed to the collider.
NOTE: if it’s a big texture you can reasonably expect it to take a significant amount of time to process.
Then you get into decisions about how big an area has to be or how close an area has to be to another area to have it be considered a single area versus a split area.
You would also need to consider how closely you want the collider to match the pixels. Detail in colliders is analogous like details in 3D geometry as far as performance goes.
It’s always better to just author your colliders in using the Unity editor, perhaps with polygon colliders.