/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_rgb_set(CRRgb *a_this, gulong a_red, gulong a_green, gulong a_blue, gboolean a_is_percentage)
/* Returns CR_OK upon successful completion, an error code otherwise.  */
enum CRStatus cr_rgb_set(CRRgb *a_this, gulong a_red, gulong a_green, gulong a_blue, gboolean a_is_percentage)
{
        g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
        if (a_is_percentage != FALSE) {
                g_return_val_if_fail (a_red <= 100
                                      && a_green <= 100
                                      && a_blue <= 100, CR_BAD_PARAM_ERROR);
        }
        a_this->is_percentage = a_is_percentage;
        a_this->red = a_red;
        a_this->green = a_green;
        a_this->blue = a_blue;
        a_this->inherit = FALSE ;
        a_this->is_transparent = FALSE ;
        return CR_OK;
}