RGB Codes In SetFillColor

hi guys, this is just rather very basic question but i wonder how do I get the usual RGB color codes for setFillColor? I tried to use standard RGB color codes (like in photoshop), for example:

textObject:setFillColor( 255, 40, 40 )

but it didn’t change the text color. then i found out that setFillColor use different RGB code pattern, the ones that’s explained here:

http://www.avatar.se/molscript/doc/colour_names.html

so let’s say I want to use grey color, then I put it like this:

textObject:setFillColor( 0.466667, 0.533333, 0.6 )

it does work but I wonder how can I use the standard RGB color codes like in photoshop? Because i want to use the same color code but I dont know what number should I put in

use 

textObject:setFillColor( 255/255, 40/255, 40/255 )

Obviously @ksan has provided the answer - so we can stop here.

But this is an opportunity for me to apologise to my math teachers - when i was younger. - They would teach us formulas etc… and we would go " but sir when will this be useful in real life??" - quite often they would not have a idea of how to answer or probably more likely did not think i would accept their answer.

Well now i know and understand.

y = x  / interger

new R value = old R value / ?

new R value * old R value = ?

I’m sorry Mr butter******.

Regards,

T.

Amazing! I had the exact same experience. Worst yet, when I did not receive a satisfactory response I often wrote off the whole subject at hand. Ah the young and rebellious us… Thanks for bringing back those memories… 

use 

textObject:setFillColor( 255/255, 40/255, 40/255 )

Obviously @ksan has provided the answer - so we can stop here.

But this is an opportunity for me to apologise to my math teachers - when i was younger. - They would teach us formulas etc… and we would go " but sir when will this be useful in real life??" - quite often they would not have a idea of how to answer or probably more likely did not think i would accept their answer.

Well now i know and understand.

y = x  / interger

new R value = old R value / ?

new R value * old R value = ?

I’m sorry Mr butter******.

Regards,

T.

Amazing! I had the exact same experience. Worst yet, when I did not receive a satisfactory response I often wrote off the whole subject at hand. Ah the young and rebellious us… Thanks for bringing back those memories…