Welcome, Guest. Please login or register.

Author Topic: Programers help. Rainbow colors  (Read 1965 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline RowbeartoeTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2008
  • Posts: 66
    • Show all replies
    • http://myspace.com/RowbeartoeIM
Programers help. Rainbow colors
« on: May 23, 2008, 09:55:22 AM »
i=0
 for red=0 to 7
  for blue=0 to 7
   for green=0 to 7
    rainbow( i )=((red*3) mod 8)* 256
                 +green* 16
                 +blue
    i=i+1
   next
  next
 next

Ok, I know a lot of you program- and since I don't I was hoping you can help me understand this.  Now this was for an Atari ST.  I understand the RGB values, the ST was 0-7 (not nearly as impressive as the Amigas 0-15).  I wanted to duplicate this rainbow manually with a paint program but don't know how to do this.  This was from my favorite Fujiboink Demo.

If you can break it down to something like this

R0 G0 B0
R0 G1 B1
R0 G2 B2
R0 G3 B3
Ro G4 B4

etc etc.  That would be great because I can understand this.  I could copy this.  

Thank you as always.  =)
 

Offline RowbeartoeTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2008
  • Posts: 66
    • Show all replies
    • http://myspace.com/RowbeartoeIM
Re: Programers help. Rainbow colors
« Reply #1 on: May 23, 2008, 06:10:19 PM »
Thank you so very much.  It makes sense now.  =)  
 

Offline RowbeartoeTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2008
  • Posts: 66
    • Show all replies
    • http://myspace.com/RowbeartoeIM
Re: Programers help. Rainbow colors
« Reply #2 on: May 24, 2008, 12:25:48 AM »
http://www.atarimagazines.com/startv1n2/Fujiboink.html

That is the link talking about the program.  

You know I must confess I thought I would understand the color values you exmplaind so I can just go in and paint the rainbow- but I'm at a loss.

R   G   B

0   0   0
0   0   1
0   0   2

0   1   0
0   1   1
0   1   2

0   2   0
0   2   1
0   2   2

0   3   0
0   3   1
0   3   2

0   4   0
0   4   1
0   4   2

0   5   0
0   5   1
0   5   2

0   6   0
0   6   1
0   6   2

0   7   0
0   7   1
0   7   2

1   0   0
1   0   1
1   0   2

1   1   0
1   1   1
1   1   2

not sure how to intrupet that code- this is my guess?  Remember I never programed before- well in basic on the 8-bit machines, but I was very amature.  =(
 

Offline RowbeartoeTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2008
  • Posts: 66
    • Show all replies
    • http://myspace.com/RowbeartoeIM
Re: Programers help. Rainbow colors
« Reply #3 on: May 24, 2008, 01:14:21 AM »
I have an Atari ST- and this PC.  Maybe you can run it on your program, and make it a word document?  I can give you a personal email as well?

 

Offline RowbeartoeTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2008
  • Posts: 66
    • Show all replies
    • http://myspace.com/RowbeartoeIM
Re: Programers help. Rainbow colors
« Reply #4 on: May 24, 2008, 01:22:32 AM »
I have Excell on the PC- how would you do that?  I'm such a bad programmer.  =(