1. Hex Conversion
------=_NextPart_000_0016_01BFD781.9BC07E60
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I was wondering if there is a way I can convert a number to a hex, =
which I could then pass as a parameter to another routine. the only hex =
conversion that EU does is to a string, but the routine won't except =
that. I need it to be converted to a real hex object.
The reason I want this is for Todd's Exotica API. All the 3d routines =
that have color params, only except hex format. I'd like to be able to =
pass an actual color value.
The way it is now, there is no way to have dynamic colors with those =
routines.
Perhaps this is a niche that only RDS can fill.
Hope I made sense.
Chris
------=_NextPart_000_0016_01BFD781.9BC07E60
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">Hello,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS"> I =
was wondering=20
if there is a way I can convert a number to a hex, which I could then =
pass as a=20
parameter to another routine. the only hex conversion that EU does is to =
a=20
string, but the routine won't except that. I need it to be converted to =
a real=20
hex object.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">The reason I want this =
is for=20
Todd's Exotica API. All the 3d routines that have color params, only =
except hex=20
format. I'd like to be able to pass an actual color value.</FONT></DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">The way it is now, =
there is no way=20
to have dynamic colors with those routines.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">Perhaps this is a =
niche that only=20
RDS can fill.</FONT></DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">Hope I made =
sense.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans =
------=_NextPart_000_0016_01BFD781.9BC07E60--
2. Re: Hex Conversion
This is a common misconception. Hex, binary, decimal, octal, and even =
ASCII characters are all different *representations* of the same number. =
When passing colors as atoms, it doesn't matter whether you use hex or =
decimal. If I say 255 or #FF, it's the same. Many people are just more =
comfortable with hex representation from programming HTML. On the other =
hand, when passing as strings, it may be quite important which format you =
use depending on how the routine parses the string. But as you already =
mentioned, sprintf handles that situation quite nicely.
HTH,
Michael J. Sabal
>>> bensler at MAILOPS.COM 06/16/00 10:57AM >>>
Hello,
I was wondering if there is a way I can convert a number to a hex, =
which I could then pass as a parameter to another routine. the only hex =
conversion that EU does is to a string, but the routine won't except that. =
I need it to be converted to a real hex object.
The reason I want this is for Todd's Exotica API. All the 3d routines that =
have color params, only except hex format. I'd like to be able to pass an =
actual color value.
The way it is now, there is no way to have dynamic colors with those =
routines.
Perhaps this is a niche that only RDS can fill.
Hope I made sense.
Chris
3. Re: Hex Conversion
------=_NextPart_000_0017_01BFD78F.93DEA380
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thnx,
It was the damndest thing. My comp was on the fritz. For some =
reason, the prog worked just fine with the hex values, but if I used a =
numerical value instead it would just be black. I had other strange =
problems too. But I solved it all with a reboot.
Chris
This is a common misconception. Hex, binary, decimal, octal, and even =
ASCII characters are all different *representations* of the same number. =
When passing colors as atoms, it doesn't matter whether you use hex or =
decimal. If I say 255 or #FF, it's the same. Many people are just more =
comfortable with hex representation from programming HTML. On the other =
hand, when passing as strings, it may be quite important which format =
you use depending on how the routine parses the string. But as you =
already mentioned, sprintf handles that situation quite nicely.
HTH,
Michael J. Sabal
------=_NextPart_000_0017_01BFD78F.93DEA380
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">Thnx,</FONT></DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS"> It =
was the=20
damndest thing. My comp was on the fritz. For some reason, the prog =
worked just=20
fine with the hex values, but if I used a numerical value instead it =
would just=20
be black. I had other strange problems too. But I solved it all with a=20
reboot.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=3D#0000ff face=3D"Comic Sans MS">Chris</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">This=20
is a common misconception. Hex, binary, decimal, octal, and even =
ASCII=20
characters are all different *representations* of the same =
number. When=20
passing colors as atoms, it doesn't matter whether you use hex or=20
decimal. If I say 255 or #FF, it's the same. Many people =
are just=20
more comfortable with hex representation from programming HTML. =
On the=20
other hand, when passing as strings, it may be quite important which =
format=20
you use depending on how the routine parses the string. But as =
you=20
already mentioned, sprintf handles that situation quite=20
------=_NextPart_000_0017_01BFD78F.93DEA380--