Arrr, no I'm passing RGB values from 0 to 255...
thx for help, this should be the bug.
/me goes color testing.
> I assume you got the code from here...
>
> http://www.cs.rit.edu/~ncs/color/t_convert.html
>
> ...or somewhere similar.
>
> Are you passing in RGB values from 0 to 1? (i.e
>
> fl
> ok, here's my util function:
>
> void UTIL_RGBtoHSV(float r,float g,float b,float &h,float &s,float &v)
> {
> float flmin, flmax, fldelta;
> flmin = min( r, min (g, b ));
> flmax = max( r, max (g, b ));
>
> v = flmax; // v
> fldelta = flmax - flmin;
> if( flmax != 0 )
> s = fldelta
ok, here's my util function:
void UTIL_RGBtoHSV(float r,float g,float b,float &h,float &s,float &v)
{
float flmin, flmax, fldelta;
flmin = min( r, min (g, b ));
flmax = max( r, max (g, b ));
v = flmax; // v
fldelta = flmax - flmin;
if( flmax != 0 )
s = fldelta / flmax; // s
else
> Sure, hue is the first value of HSV, and I'am only using this one when
> setting the top and bottom color, but the color isn't right either.
Perhaps you aren't doing something right. Show some code.
Jeffrey "botman" Broome
___
To unsubscribe, edit y
e of the palette
entries,
> just replacing the hue with the specified value.
>
> -Original Message-
> From: Nicemice [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 7:54 AM
> To: [EMAIL PROTECTED]
> Subject: [hlcoders] RGB to Half-Life Player Model Color
>
>
&g
I _think_ there is a windows function to convert it, RGB(red,green,blue);
- Original Message -
From: "Ken Birdwell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 12, 2002 11:56 PM
Subject: RE: [hlcoders] RGB to Half-Life Player Model Color
>
, 2002 7:54 AM
To: [EMAIL PROTECTED]
Subject: [hlcoders] RGB to Half-Life Player Model Color
Hi,
I want to set the player model colors from the mod code. It's a team based
based mod an the level designer can choose the color of the teams via an
entity.
Now I need a function which give m
Hi,
I want to set the player model colors from the mod code. It's a team based
based mod an the level designer can choose the color of the teams via an
entity.
Now I need a function which give me the correct top/bottom color values from
my r,g,b value. I first thought Valve uses a HSV Color table
8 matches
Mail list logo