Computer Science Canada

SuperColour

Author:  TheZsterBunny [ Wed Feb 25, 2004 5:54 am ]
Post subject:  SuperColour

code:
var clr : int
var r, g, b : real
var rdiff, gdiff, bdiff := 0.005
r := 0
g := .5
b := 1
loop
    if r + rdiff > 1 or r + rdiff < 0 then
        rdiff := -rdiff
    end if
    r := r + rdiff
    if g + gdiff > 1 or g + gdiff < 0 then
        gdiff := -gdiff
    end if
    g := g + gdiff
    if b + bdiff > 1 or b + bdiff < 0 then
        bdiff := -bdiff
    end if
    b := b + bdiff
    clr := RGB.AddColor (r, g, b)
    colorback (clr)
    cls
    locate ((maxrow div 2) - 1, maxcol div 2)
    color (white)
    put whatdotcolor (5, 5)
    delay (50)
end loop


Now, I've never seen a colour code beyond 255 in turing before. What is my program doing?

-Bunny

Author:  jonos [ Wed Feb 25, 2004 4:50 pm ]
Post subject: 

i think you're just creating colours with RGB.AddColor. i think i remember cervantes saying something about there being 1024 colours that can be used or something.

Author:  Cervantes [ Thu Feb 26, 2004 7:21 pm ]
Post subject: 

its not that hard to figure out what your prog is doing when you attach the code Razz

and yes you can use more than 256 colours in Turing jonos, maybe 1024, dunno, it wasn't me that said it Razz

Author:  TheZsterBunny [ Fri Jun 11, 2004 5:26 am ]
Post subject: 

--note--
at the time of this post, i was experimenting with the RGB module. it seems to be left out.

-Z


: