@SuppressWarnings("unchecked")
	private static short  getIndexOfColor(String color)
    {
       Hashtable<String, HSSFColor> hashtable = HSSFColor.getTripletHash();
        StringBuffer sb = new StringBuffer();
       if(color.startsWith("#"))
       {
         //color = color.substring()
         color = color.substring(color.indexOf("#")+1,color.length());
         if(color.length()>=6)
         {

             for(int i=0;i<color.length();i++)
             {
                 if(i%2==0)
                 {
                     String a = color.substring(i,i+2);
                     if("00".equals(a))
                     {
                        sb.append("0"); 
                     }else
                     {
                         sb.append(a).append(a);
                     }

                    sb.append(":");
                 }
             }
             
         }
       }
        String c = sb.toString().substring(0,sb.toString().lastIndexOf(":"));
        HSSFColor hssfc = hashtable.get(c.toUpperCase());
        if(hssfc!=null)
        {
           return hssfc.getIndex();
        }
         return 0; //返回0说明没有找到颜色代码索引
    }