Coor-to-gray conversion in many applications requires preserving both the visual appearance and feature discrimination of color images. The existing methods are still need og improvement in these aspects. A two-stage color-to-gray transform algrithm is proposed in this paper. It produces a grayscale image that matches the color contrast and the lightness of a given input color imagle. The first stage process is a functional mapping scheme based on the natural order of hues. The mappig is simple and fast, yet it preserves feature discrimination and approproate color order of color images. The second stage of the proposed algorithm recorvers the lightness of a color image through adjusting the local contarast of the first-stage output.It not only retaints the visual appearance of the color image but also compensates the functional mapping for possible loss of color information. The proposed method could accurately convert various categories of color images to grayscale images, including natural images, computational images, and painting images. Experimental results show that our method produced perceptually accurate and preferred images when they were compared with other schemes.