/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_rgb_set_from_name(CRRgb *a_this, const guchar *a_color_name)
/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_rgb_set_from_name(CRRgb *a_this, const guchar *a_color_name)
{
        gulong i = 0;
        enum CRStatus status = CR_OK;
        g_return_val_if_fail (a_this && a_color_name, CR_BAD_PARAM_ERROR);
        for (i = 0; i < sizeof (gv_standard_colors); i++) {
                if (!strcmp (a_color_name, gv_standard_colors[i].name)) {
                        cr_rgb_set_from_rgb (a_this, &gv_standard_colors[i]);
                        break;
                }
        }
        if (i < sizeof (gv_standard_colors))
                status = CR_OK;
        else
               status = CR_UNKNOWN_TYPE_ERROR;
        return status;
}