[Cogl] [PATCH 1/3] color: Add HSL conversion functions

Neil Roberts neil at linux.intel.com
Tue May 28 07:00:08 PDT 2013


Robert Bragg <robert at sixbynine.org> writes:

> I just realized that this bit also needs to initialize the alpha component:
>
> +  if (saturation == 0)
> +    {
> +      color->red = color->green = color->blue = (luminance * 255);
> +
> +      return;
> +    }

Looks like it also shouldn't multiply by 255 seeing as CoglColors are
floats.

Regards,
- Neil
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the Cogl mailing list