1. 256 colours or NOT
------=_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--
2. Re: 256 colours or NOT
------=_NextPart_000_0014_01BDCDA3.A4E3D580
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Roy,
>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
=20
It could be that you are just seeing the palette as defined by the =
system palette. You can set the pallette to anything you want, there =
is an availability of 256 colors. Each color in the palette is defined =
by a color set {r,g,b}
l8tr...
Monty
------=_NextPart_000_0014_01BDCDA3.A4E3D580
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"><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Roy,</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
<DIV><FONT size=3D2>>One thing that puzzles me is there is only =
247=20
colours, as the program below demonstrates. >Dose anyone know why =
this=20
is? And is it possible to get the remaining 9 colours?</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2><BR>It could be that you are =
just seeing the=20
palette as defined by the system palette. You can set the =
pallette to=20
anything you want, there is an availability of 256 =
colors. Each=20
color in the palette is defined by a color set {r,g,b}</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>l8tr...</FONT></DIV>
<DIV><FONT color=3D#000000 =
------=_NextPart_000_0014_01BDCDA3.A4E3D580--
3. 256 colours or NOT
The VGA default palette goes something like this :-
0 ~ 15 - 16 standard EGA/VGA colours
16 ~ 31 - 16 Grey scales
32 ~ 247 - 216 variations of red,green & blue
248 ~ 255 - 8 blank palette entries (black)
4. Re: 256 colours or NOT
>Date: Sun, 23 Aug 1998 14:55:21 -0400
>Reply-To: Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
>From: Peter Blue <PeterBlue at COMPUSERVE.COM>
>Subject: 256 colours or NOT
>To: EUPHORIA at LISTSERV.MUOHIO.EDU
>
>The VGA default palette goes something like this :-
<snip>
>32 ~ 247 - 216 variations of red,green & blue
<snip>
Hmm... now there's the colors, what about resolutions? (Can I search the
'net for this?) ... Now I think... is this only color variations? not
modes? waahhhh....
-- "LEVIATHAN"
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
5. Re: 256 colours or NOT
On Sun, 23 Aug 1998, Peter Blue wrote:
> The VGA default palette goes something like this :-
> 0 ~ 15 - 16 standard EGA/VGA colours
> 16 ~ 31 - 16 Grey scales
> 32 ~ 247 - 216 variations of red,green & blue
> 248 ~ 255 - 8 blank palette entries (black)
>
All I can say is when I wrote a paint program that was able to adjust the
palette I could adjust ALL 256 colors. But I did run into some wierd
stuff with the first fifteen, like they would change back after I returned
from a routine and printed something.
I would have posted it on the Official Euphoria page but I coded it in
about 2 weeks and the code is REALLY ugly. Not very modular, a real pain
to add something to pull down menus, and only works in 1 graphics mode
(800x600x256 I think.)
I'll send it if anyone thinks they can learn anything usefull.
-Humberto Yeverino Jr.
"I kick ass for the Lord."
http://www.engr.csufresno.edu/~humberto/Home.html
humberto at engr.csufresno.edu
<font size=3>For browsers:<br>
<a href="http://www.engr.csufresno.edu/~humberto/Home.html">
Have a look.</a></font><br>