HCV colors to RGB colors (fwd)

New Message Reply Date view Thread view Subject view Author view

horne++at++vislab.su.edu.au
Thu, 25 May 1995 11:44:43 +1000 (EDT)


Rejean Chartrand said:

> I would like to know if anybody has ever converted HCV colors
> to RGB colors. Presummably I need to have a "Base Color" to be able
> to perform the conversion but I don't have any; I just have HCV values
> which I would like to convert to RGB values. I would appreciate having
> a piece of code that does that.

If you mean converting HSV (Hue, Sat, Val) to RGB then there are
tools to do this in /usr/people/4Dgifts

the function is hsv_to_rgb(hh,ss,vv,&r,&g,&b);
and it is part of /usr/include/libgutil.a

other functions in the library are:

        irgb_to_rgb(ir,ig,ib,r,g,b);
        cmy_to_rgb(c,m,y,r,g,b);
        hls_to_rgb(h,l,s,r,g,b);
        hsv_to_rgb(h,s,v,r,g,b);
        hsb_to_rgb(h,s,v,r,g,b);
        yiq_to_rgb(y,i,q,r,g,b);
        rgb_to_cmy(r,g,b,c,m,y);
        rgb_to_irgb(r,g,b,ir,ig,ib);
        rgb_to_hls(r,g,b,h,l,s);
        rgb_to_hsv(r,g,b,lh,ls,lv);
        rgb_to_hsb(r,g,b,lh,ls,lv);
        rgb_to_yiq(r,g,b,y,i,q);

-----------------------------------------------------------------------------
       Geoff Horne http://www.usyd.edu.au/~ghorne

          Computational Scientist and VisLab conundrum rectifier
-----------------------------------------------------------------------------
    "Don't take life too seriously, you don't get out of it alive anyway"
                                                        Burt Ward


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:32 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.