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

Robert Bragg robert at sixbynine.org
Tue May 28 07:05:02 PDT 2013


Right, in Rig we use rut_color_init_from_4f in this case, maybe we could do
the same kind of thing here.

Regards, - Robert
On May 28, 2013 2:59 PM, "Neil Roberts" <neil at linux.intel.com> wrote:

> 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.
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/cogl/attachments/20130528/25df6e2e/attachment.html>


More information about the Cogl mailing list