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

Username:   Password: 
 RegisterRegister   
 RGB?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SilverSprite




PostPosted: Tue Apr 08, 2003 5:47 pm   Post subject: RGB?

What is RGB.?
Sponsor
Sponsor
Sponsor
sponsor
Martin




PostPosted: Tue Apr 08, 2003 5:58 pm   Post subject: (No subject)

Red Green Blue
It's a module for colours. You give it three values (real I think) and it creates colours. I think this makes it so that there are 64 x 64 x 64 possible colours.
haujobb




PostPosted: Tue Apr 08, 2003 7:00 pm   Post subject: (No subject)

to it is 256x256x256

rgb values are stored in hex format, so it is 6 digits or 3 btyes, each byte can be between 0 and 255
Dan




PostPosted: Tue Apr 08, 2003 10:12 pm   Post subject: (No subject)

plz post in the right topic next time. i moved it this time but next time i may just delet it Twisted Evil
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Asok




PostPosted: Tue Apr 08, 2003 11:56 pm   Post subject: (No subject)

R,G,B

0,0,0 -WHITE

256,256,256 -BLACK

256,0,0 - RED

0,256,0 - GREEN

0,0,256 - BLUE

and as such you can create combinations of them to get every other colour but I'm not one to post over a million colours so go figure the rest out for yourself Wink
Blade




PostPosted: Wed Apr 09, 2003 12:10 am   Post subject: (No subject)

i thought 0,0,0 was black, and 256,256,256 was white? well... i dunno about turing but in html its that way
Asok




PostPosted: Wed Apr 09, 2003 12:49 am   Post subject: (No subject)

I'm saying how it is in turing and in photoshop, think about it like this, unfiltered light is automatically white. If you put a whole crap load of coloured filters infront of it, it becomes darker, eventually black.
Blade




PostPosted: Wed Apr 09, 2003 7:32 am   Post subject: (No subject)

then when you put a light through a prism you get rgb? theres no such thing as black light... so you cant divide it into 3.. white is thee combonation of all three colours... go try it in ps again.. i'm sure whitee is the combo of all 3 and black is the absence of colour.. heeres another way to think of it... your eeyes pick up on colours becausee thee white light reeflects off of the colours and then into your eyes, if it didnt contain all 3 then white wouldnt be able to break down into anything, and all you would see is black
Sponsor
Sponsor
Sponsor
sponsor
Asok




PostPosted: Wed Apr 09, 2003 10:24 am   Post subject: (No subject)

not how it works, try it in turing and prove me wrong Wink
Blade




PostPosted: Wed Apr 09, 2003 11:02 am   Post subject: (No subject)

Quote:
RGB.GetColor Part of RGB module

Syntax RGB.GetColor (colorNumber : int,
var redComp, greenComp, blueComp : real)


Description The RGB.GetColor procedure returns the red, green and blue components to the color associated with the colorNumber parameter. The red, green and blue values are normalized to be between 0 and 1. Thus color white returns 1.0 for the redComp, greenComp and blueComp values and color black returns 0.0 for all three.


code:
colourback(33)
cls
%colour 33 is blue
var col:int:=33
RGB.SetColor(col,0,0,0)
drawfillbox(100,100,200,200,col)
%colour 50 is bright green
var col2:int:=50
RGB.SetColour(col2,1,1,1)
drawfillbox(200,200,300,300,col2)
Asok




PostPosted: Wed Apr 09, 2003 11:34 am   Post subject: (No subject)

set col2 to 256,256,256 and you get black not white

code:
var col2 : int := 50
RGB.SetColour(col2,256,256,256)
drawfillbox(200,200,300,300,col2)
Blade




PostPosted: Wed Apr 09, 2003 12:06 pm   Post subject: (No subject)

set col2 to 0,0,0 and you get black, the only way to get white is to set it to 1... turing is f*cked... you choose 255,255,255 in photoshop, html or anything else, even in java you get white... i'm still right though Very Happy
Asok




PostPosted: Wed Apr 09, 2003 3:10 pm   Post subject: (No subject)

I just checked photoshop, blade was right, as such I'll admit defeat and award thee +10 bits!
Blade




PostPosted: Wed Apr 09, 2003 8:30 pm   Post subject: (No subject)

THANKS MAN!! Very Happy i wouldnt argue with you if i didnt know i was right... remember that Wink
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  [ 14 Posts ]
Jump to:   


Style:  
Search: