Пример #1
0
    /**
     * color转16进制颜色
     * return "ff(R)ff(G)ff(B)ff(A)"
     */
    static public string Color2RGBA(Color color)
    {
        string str = "#" + IntUtils.ToHexString((long)color.r * 255) +
                     IntUtils.ToHexString((long)color.g * 255) +
                     IntUtils.ToHexString((long)color.b * 255) +
                     IntUtils.ToHexString((long)color.a * 255);

        return(str);
    }