et colors as html hex
Moderators: Forum moderators, developers
- Ragnar_40k
- Posts: 394
- Joined: Thu Mar 18, 2004 5:18 pm
- Location: Berlin, birthplace of the Döner
- Contact:
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.
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.
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?).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