256 colours or NOT
- Posted by Roy Shepherd <sroy at GLOBALNET.CO.UK> Aug 22, 1998
- 554 views
------=_NextPart_000_0012_01BDCDDB.303EDD00 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Every one=20 =20 I'm new to the web and Euphoria programming although I have dabbled in = other languages, dare I mention 'C' <g>. I am currently working on a = mode 19 (256 colour) sprite editor. One thing that puzzles me is there = is only 247 colours, as the program below demonstrates. Dose anyone know = why this is? And is it possible to get the remaining 9 colours? =20 include graphics.e=20 include get.e=20 if graphics_mode(19) then-- 256 colour mode ? end if=20 for colour =3D 240 to 255 do text_color(WHITE) printf(1,"\n%d%s",colour & "=3D") text_color(colour) =20 puts(1,"*") end for =20 =20 if wait_key() then end if=20 if graphics_mode(-1) then end if =20 --End of program--=20 =20 Regards =20 Roy =20 ------=_NextPart_000_0012_01BDCDDB.303EDD00 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 = HTML//EN"> <META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000 size=3D2>Hi Every one</FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT size=3D2>I'm new to the web and Euphoria <FONT=20 color=3D#000000>programming </FONT>although I have dabbled in other = languages,=20 dare I mention 'C' <g>. I am currently working on a mode 19 (256 = colour)=20 sprite editor. One thing that puzzles me is there is only 247 colours, = as the=20 program below demonstrates. Dose anyone know why this is? And is it = possible to=20 get the remaining 9 colours?</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2><BR>include graphics.e <BR>include=20 get.e</FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>if graphics_mode(19) then-- 256 = colour mode=20 ?<BR>end if</FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>for colour =3D 240 to 255=20 printf(1,"\n%d%s",colour &=20 text_color(colour) <BR> =20 puts(1,"*")<BR>end=20 <BR>if wait_key() then<BR>end if</FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>if graphics_mode(-1) then<BR>end=20 if </FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>--End of = program--</FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Regards</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>Roy</FONT></DIV> ------=_NextPart_000_0012_01BDCDDB.303EDD00--