title: Problem with NSColors in cocoa
body: <p>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:</p>
  
  <pre><code>(r,g,b):(50,50,50)
  (r,g,b):(100,100,100)
  (r,g,b):(150,150,150)
  (r,g,b):(200,200,200)
  </code></pre>
  
  <p>etc...</p>
  
  <p>the code  used to create the colors is:</p>
  
  <p>// the code to genearet simple images with background colors</p>
  
  <pre><code>NSColor * myColor = [NSColor colorWithDeviceRed:100.0 green:100.0 blue:100.0 alpha:1.0];
  NSImage* image1 = [[NSImage alloc] initWithSize:NSMakeSize(10.0,  100.0)];
  NSRect imageBounds1 = NSMakeRect (0, 0, 10, 100);
  
  [image1 lockFocus];
  [myColor set];
  NSRectFill (imageBounds1);
  [image1 unlockFocus];
  </code></pre>
  
  <p>I couldn't find any resource or sample on the web, which provides some sort of help on my above queries.It's highly appreciated if someone could share his wisdom on how I can achieve this.</p>
  
  <p>Thanks in advance..</p>