Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 The color thing..
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
icexblood




PostPosted: Sun Mar 16, 2008 6:48 pm   Post subject: The color thing..

Whats the code to see every color in the program again?.. its like a slide show with the delay with every color it shows :S
Sponsor
Sponsor
Sponsor
sponsor
jinjin




PostPosted: Sun Mar 16, 2008 6:55 pm   Post subject: Re: The color thing..

I think you might be referring to this:

code:

colour (0)
for bc:1..255
colourback(bc)
put bc
end for
A.J




PostPosted: Sun Mar 16, 2008 7:03 pm   Post subject: Re: The color thing..

Turing:

colour (0)
for bc : 1 .. 255
    colourback (bc)
    put bc
    delay (500)
end for

he wanted delay...
icexblood




PostPosted: Sun Mar 16, 2008 7:07 pm   Post subject: RE:The color thing..

thxx
Tony




PostPosted: Sun Mar 16, 2008 7:44 pm   Post subject: RE:The color thing..

I prefer something along the lines of
Turing:

for x : 1 .. 255
    Draw.Line(x,0,x,maxy,x)
end for

So that you can see all the colours at the same time.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Sun Mar 16, 2008 8:06 pm   Post subject: RE:The color thing..

You can also mix your own colors with the RGB moduel.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Sean




PostPosted: Mon Mar 17, 2008 6:16 am   Post subject: Re: The color thing..

Turing:

colour (0)
for c:1..255
    colourback(c)
    put " ",c," "..
end for


Shows every colour, with every box, on one screen, requiring no delays.
Tony




PostPosted: Mon Mar 17, 2008 9:14 am   Post subject: RE:The color thing..

what I like about drawing it line by line (though this will probably show up in blocks as well), is that you'll notice there's a really nice black-to-white gradient in one of the sections. It's quite good for animations and effects, without having to figure out RGB. module.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Mon Mar 17, 2008 1:45 pm   Post subject: Re: The color thing..

Modded the Scollbar GUI to make a colour contraption for the hell of it.



code:

import GUI

View.Set ("graphics:180;400,nobuttonbar")
var scrollBar : int

procedure ScrollBarMoved (value : int)
    for i : 0 .. 20
        locate (3 + i, 8)
        colorback (white)
        put 235 - value + i : 3
        locate (3 + i, 12)
        colorback (235 - value + i)
        put ""
    end for
end ScrollBarMoved

scrollBar := GUI.CreateVerticalScrollBar (10, 10, 380,
    0, 235, 235, ScrollBarMoved)

loop
    exit when GUI.ProcessEvent
end loop
riveryu




PostPosted: Mon Mar 17, 2008 5:03 pm   Post subject: RE:The color thing..

Zren, you could just set the y value of the screen very large and have the same effect as the scrollbar...
Good work anyways
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: