<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Thanks a lot for the Help.</FONT></DIV>
<DIV><FONT face=Arial size=2>Actually I managed to solve it and I'm sorry I
didn't post this.</FONT></DIV>
<DIV><FONT face=Arial size=2>I just used eval("0xff").</FONT></DIV>
<DIV><FONT face=Arial size=2>Here the code I used:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>function gethicolor(colorstr)<BR>{</FONT></DIV>
<DIV><FONT face=Arial size=2><BR> red = eval("0x" +
colorstr.slice(1,3));<BR> green = eval("0x" +
colorstr.slice(3,5));<BR> blue = eval("0x" +
colorstr.slice(5,7));</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> red = red
+ 50;<BR> green = green + 50;<BR> blue = blue +
50;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if(red > 255)red =
255;<BR> if(green > 255)green = 255;<BR> if(blue >
255)blue = 255; <BR> <BR> return ((red * 65536) +
(green * 256) + blue);<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Just adding a fixed value to color components
doens't result in a good highlight but...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thank's again.</FONT></DIV>
<DIV><FONT face=Arial size=2>Bye.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:filipiab@atsc.army.mil" title=filipiab@atsc.army.mil>Filipiak,
Bob (Contractor)</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:'javascript@LaTech.edu'"
title=javascript@LaTech.edu>'javascript@LaTech.edu'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, April 20, 2001 7:19
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Javascript] How do I
convert "FF" to 255?</DIV>
<DIV><BR></DIV>
<DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=749571318-20042001>Modify this:</SPAN></FONT></DIV>
<DIV><SPAN class=749571318-20042001></SPAN><FONT color=#0000ff face=Arial
size=2> </FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=749571318-20042001><<SPAN
class=171501818-20042001><</SPAN>HTML><BR><<SPAN
class=171501818-20042001><</SPAN>HEAD><BR><<SPAN
class=171501818-20042001><</SPAN>TITLE>Numbers Conversion
Table</TITLE><BR><<SPAN
class=171501818-20042001><</SPAN>/HEAD></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=749571318-20042001><<SPAN
class=171501818-20042001><</SPAN>BODY><BR><<SPAN
class=171501818-20042001><</SPAN>B>Using toString() to convert to other
number bases:</B><BR><TABLE border=1><BR><<SPAN
class=171501818-20042001><</SPAN>TR><BR><<SPAN
class=171501818-20042001><</SPAN>TH>Decimal</TH></SPAN></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><SPAN
class=749571318-20042001><SPAN
class=171501818-20042001><</SPAN><TH>Hexadecimal</TH></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><SPAN
class=749571318-20042001><SPAN
class=171501818-20042001><</SPAN><TH>Binary</TH><BR><<SPAN
class=171501818-20042001><</SPAN>/TR><BR><SPAN
class=171501818-20042001><</SPAN><SCRIPT
language="JavaScript"><BR><<SPAN
class=171501818-20042001><</SPAN>!--<BR>var content = "";<BR>var i =
0;<BR>for (i = 0; i <= 255; i++){<BR> content =
"<TR>";<BR> content = content + "<TD>" +
i.toString(10) + "</TD>";<BR> content = content +
"<TD>" + i.toString(16) + "</TD>";<BR> content =
content + "<TD>" + i.toString(2) +
"</TD></TR>";<BR>document.write(content)<BR>}</SPAN></FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><SPAN class=749571318-20042001><A href="file://--/"><FONT face=Arial
size=2>//--</FONT></A><FONT color=#0000ff face=Arial size=2>><BR><SPAN
class=171501818-20042001><</SPAN></SCRIPT><BR><<SPAN
class=171501818-20042001><</SPAN>TR><TD>&nbsp;</TD><TD>&nbsp;</TD><TD>&nbsp;</TD></TR><BR><<SPAN
class=171501818-20042001><</SPAN>/TABLE><BR><<SPAN
class=171501818-20042001><</SPAN>/BODY><BR><<SPAN
class=171501818-20042001><</SPAN>/HTML></FONT></SPAN></DIV>
<DIV> </DIV></DIV>
<DIV> </DIV>
<P><FONT size=2>Bob Filipiak (Contractor)<BR>MCP </FONT></P>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Rui Fortes
[mailto:RuiFortes@clix.pt]<BR><B>Sent:</B> Friday, April 20, 2001 12:23
PM<BR><B>To:</B> javascript@LaTech.edu<BR><B>Subject:</B> [Javascript] How
do I convert "FF" to 255?<BR><BR></DIV></FONT>
<DIV><FONT face=Arial size=2>Hello.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>How can I get an highlighted version of a
color.</FONT></DIV>
<DIV><FONT face=Arial size=2>That is, how can I find the code of a color
wich is a lighter version of another color.</FONT></DIV>
<DIV><FONT face=Arial size=2>I tryed to do this myself but I need, for
instance, to know how to get a number from a string representing an
hexadecimal number.</FONT></DIV>
<DIV><FONT face=Arial size=2>I could then add some value to RGB components
and use RGB(newred, newgreen, newblue) to get that color.</FONT></DIV>
<DIV><FONT face=Arial size=2>I found Hex function that returns a string
representing the hexadecimal convertion of a number.</FONT></DIV>
<DIV><FONT face=Arial size=2>Is there an inverse function to turn a string
into a number?</FONT></DIV>
<DIV><FONT face=Arial size=2>Something like afunc("FF") that returns
255.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>