int to hex
#1

how can i make some thing that converts int to hex for example that: 255 to that 0000FF,that 0 to that 000000 or that 16776960 to that FFFF00?
thanks
Reply
#2

it's for colors right? just download a color picker
Reply
#3

http://www.mathsisfun.com/binary-dec...converter.html

put the int on Decimal: and take the hex color.
Reply
#4

Quote:
Originally Posted by billiout
http://www.mathsisfun.com/binary-dec...converter.html

put the int on Decimal: and take the hex color.
never mind
i just wanted to test some thing
thats what i've does:
Код:
if(!fexist("allcolors.txt")){
	new str[60],File:C;
	C = fopen("allcolors.txt",io_append);
	for(new i;i<=16777216;i++){
	  format(str,60,"%06x\r\n",i);
		fwrite(C,str);
	}
	fclose©;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)