Added -g flag support for gradient