The Many Colours of Turing
Author |
Message |
Parzival
|
Posted: Tue Mar 26, 2013 7:11 pm Post subject: The Many Colours of Turing |
|
|
Now for anyone trying to get the hang of colours, there are two ways you can change the colour of something.. either by stating the name of the colour (word) or by typing in the colour's assigned value (nuumber).
Some examples of what it would look like if you were to use the colour's name:
colour(green)
colour(brightgreen)
colour(blue)
*NOTE: Not all colours are supported. Which is why it can be better to use the values.
Some examples of what it would look like if you were to use the colour's value:
colour(13)
colour(57)
colour(89)
As you can probably see, it's impossible to tell what colour the numbers are assigned to, unless of course you have a chart or have memorized each one.
So to make it a bit easier, I have quickly written a program that prints out all of the colours as well as their values. The comments do a fairly good job at
explaining what the program does, assuming you have some knowledge of the language. Just copy the following text into Turing (I use 4.1.1) and hit Run to see
all of the colours appear before you along with their values.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Turing: | % If you want to make this program 'Windowed Fullscreen', change the line below this to ' setscreen("graphics:max;max") '
setscreen("graphics,position:center;bottom")
setscreen("nobuttonbar") %removes the toolbar with "Pause, Close, Print, Save, Paste" on it. Either delete or comment out this line if you want the bar.
setscreen("title: Colours in Turing") %What the program says in the top bar, feel free to change it to whatever you like.
% Sets the colours as well as the numbers. There are only 255 colours in Turing, so we use the range 1 to 255
for a : 1 .. 255
% Changes the text colour so it is easier to read what the number is.
% If you want to add any more, just add this to the first 'if' line:
%
% " a=x ".
% ^
% *Replace the 'x' with the number you want to change the colour of*
if a= 31 or a= 14 or a= 68 or a= 44 or a= 90 or a= 91 or a= 92 or a= 93 or a= 94 or a= 95 or a= 96
then
colour (1) % The colour that the text changes to.. in this case, Black(1)
else
colour (31)% If 'a' does not equal one of those numbers, the text stays White(31)
end if
colourback (a ) % Makes the background colour, one of the colours in the range 1..255
put a, " " .. % Prints it all out on the screen.. if you want to be able to see more of the colours, just make the " " farther apart.
% This may interfere with the layout but the colours and numbers will still be in order.
end for
|
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I would save this program somewhere on your computer so that it's conveniently there at your disposal. I'm sorry if this wasn't as in-depth as you expected it to be. I more or less just created this 'Tutorial" to give you the program and tell you a little bit about colours. Thank you.
*NOTE: You can't just put "colour(blue)" or "colour(45)" into Turing alone. It must be assigned to either text or an object, otherwise it will not appear.
*NOTE: Also take note that I am Canadian, I spell colour with a 'u'. Turing will accept either "colour" or "color"
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Insectoid
|
Posted: Tue Mar 26, 2013 7:18 pm Post subject: RE:The Many Colours of Turing |
|
|
You should look into the rgb module. color(x) is limited to 128 colors (I think. It might be 256). The rgb module allows far more colors. |
|
|
|
|
|
Cancer Sol
|
|
|
|
|
Insectoid
|
Posted: Tue Mar 26, 2013 7:33 pm Post subject: RE:The Many Colours of Turing |
|
|
Yeah, I'm not a mod. Dunno why, I mean, I should be right now, right? |
|
|
|
|
|
Cancer Sol
|
Posted: Tue Mar 26, 2013 8:08 pm Post subject: Re: RE:The Many Colours of Turing |
|
|
Insectoid @ 3/26/2013, 7:33 pm wrote: Yeah, I'm not a mod. Dunno why, I mean, I should be right now, right?
Yeah
You've helped the community a lot, and you're an active member.
Maybe you should talk to Dan about being a mod
I would PM Dan or Tony to be your voucher, but I kinda spammed Dan a bit... if three PM's count xD |
|
|
|
|
|
Insectoid
|
Posted: Tue Mar 26, 2013 8:10 pm Post subject: RE:The Many Colours of Turing |
|
|
I talk to Dan all the time. If I'm not a mod, there's a reason for it. |
|
|
|
|
|
Dan
|
Posted: Wed Mar 27, 2013 1:58 am Post subject: RE:The Many Colours of Turing |
|
|
I added a code tag to your post Parzival (as requested by Cancer Sol).
There is no reason in particular Insectoid is not a mod other then the fact that we don't relay need any more mods right now. However, if you want Insectoid I can give you a custom title/rank since you have at least earned that. PM me if you want one. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Cancer Sol
|
Posted: Thu Mar 28, 2013 4:26 pm Post subject: Re: RE:The Many Colours of Turing |
|
|
Dan @ 3/27/2013, 1:58 am wrote: I added a code tag to your post Parzival (as requested by Cancer Sol).
There is no reason in particular Insectoid is not a mod other then the fact that we don't relay need any more mods right now. However, if you want Insectoid I can give you a custom title/rank since you have at least earned that. PM me if you want one.
Thanks Dan, so many people aren't using them. I just wish they would read the sticky |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|