et colors as html hex

Any discussions that are non-rtcw/et related go here.

Moderators: Forum moderators, developers

User avatar
Deus
Posts: 1053
Joined: Fri Mar 12, 2004 2:24 am
Location: Germany
Contact:

Post by Deus »

this means: Close this thread ASAP ;)
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

Deus wrote:this means: Close this thread ASAP ;)
lol, nooooooo! if i win i deserve to know so i can rub Gotenks' nose in it! j/k <3
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

lol, it still has to be manually rounded when converted to a byte, or else it is truncated... bani can answer the question, since he has more code then we do
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
Ragnar_40k
Posts: 394
Joined: Thu Mar 18, 2004 5:18 pm
Location: Berlin, birthplace of the Döner
Contact:

Post by Ragnar_40k »

You miss some point. When you convert a float value to integer then its simply truncated (in C). But ET (and OpenGL) don't convert these values to integer at all - they handle it as float. So you should try to pick the closest possible value, when converting it to a byte value (and therefore use "mathematical" rounding).

Another point is that these color values pass through a lot of adjustments (e.g. due to brightness settings). So the best way the get the color codes might be to run ET with default settings, to take a screen shot from a color list (generated by a script) and then to pick the color values from the screenshot.
The Emperor watch over you.
bacon
Posts: 549
Joined: Sat Apr 19, 2003 9:34 pm
Contact:

Post by bacon »

gotenks wrote:lol, it still has to be manually rounded when converted to a byte, or else it is truncated... bani can answer the question, since he has more code then we do
Please think of the PHP kiddies and refer to truncate as floor from now on...epseically since it does what you're telling us is happening more accurately (be more specific when you say truncate mmmmmkay?).
Post Reply