i am trying to compose colors using NSColor and when i am trying to create RGB color with the following values it just displays the white colors instead:
(r,
NSColor components have values in [0..1] so you should normalize the values you have, e.g.:
NSColor * myColor = [NSColor colorWithDeviceRed:100.0/255 green:100.0/255 blue:100.0/255 alpha:1.0];
If you try to set values greater then 1 to colour components then they're interpreted as 1, so your code will be actually equivalent to
NSColor * myColor = [NSColor colorWithDeviceRed:1.0 green:1.0 blue:1.0 alpha:1.0];
Which creates white colour.