Hi.
From a painting perspective I don't think it would be wise, all dyes contain chemicals that can leech, (both water and oil based) Even if you sealed the wood after staining, wood sealers are never guaranteed underwater (he he, hence the reason you always have to re seal your decks every few years.
Andres