pike.git / lib / modules / Colors.pmod

version» Context lines:

pike.git/lib/modules/Colors.pmod:76:   }      //! This function returns the RGB values that corresponds to the   //! color that is provided by name to the function. It is   //! essentially calling @[Image.Color.guess()], but returns the   //! value for black if it failes.   //!   array(int(0..255)) parse_color(string name)   {    Image.Color.Color color; -  if(!name || !strlen(name)) return ({ 0,0,0 }); // Odd color... +  if(!name || !sizeof(name)) return ({ 0,0,0 }); // Odd color...       if(color=Image.Color.guess(name)) return color->rgb();       name = replace(lower_case(name), "gray", "grey");    if(color=Image.Color.guess(name)) return color->rgb();       // Lets call it black and be happy..... :-)    return ({ 0,0,0 });   }