Visual cryptography was first introduced by Naor and Shamir and the scheme has the benefit of requiring no cryptographic computation on the part of decoders. The modified visual cryptography is a new scheme, which requires little cryptographic computation on the part of decoders. In this paper, a new generalized (k,n) gray visual cryptography scheme is proposed based on modified visual cryptography. This scheme provides a more efficient way to hide a gray image which has 256-colors in n different shared images. Also, for a computer system, two types of unconditional security generalized (k,n) color visual cryptography scheme are proposed.