[Date Index] [Thread Index] [Author Index]
Re: Determine brightness of colour/Convert to GrayLevel
On 6/10/08 at 7:14 AM, szhorvat at gmail.com (Szabolcs Horv=C3=A1t) wrote: >Colours have several representations, such as RGBColor, CMYKColor, >GrayLevel, etc. >Is there a way to convert between these representations? More >specifically is there a way to convert a colour to GrayLevel? The function you want is ToColor. For example, In:= ToColor[ColorData, GrayLevel] Out= GrayLevel[0.283193] >Also, is there a way to convert a colour to some canonical >representation? Doesn't RGBColor satisfy your need for a canonical representation? That is it seems to me a canonical representation of a color would simply be a specification of all colors in a single color space which is certainly satisfied by using RGBColor.