/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_rgb_compute_from_percentage(CRRgb *a_this)
/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_rgb_compute_from_percentage(CRRgb *a_this)
{
        g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
        if (a_this->is_percentage == FALSE)
                return CR_OK;
        a_this->red = a_this->red * 255 / 100;
        a_this->green = a_this->green * 255 / 100;
        a_this->blue = a_this->blue * 255 / 100;
        a_this->is_percentage = FALSE;
        return CR_OK;
}