title: Sort Colors (Objective-C)
body: <p>I'm doing this sort of thing:</p>
  
  <pre><code>- (NSArray*)colors {
      float divisor = .3333;
      NSMutableArray *retVal = [NSMutableArray array];
      for (float one=0; one &lt;= 1.0f; one += divisor) {
          for (float two = 0; two &lt;= 1.0f; two += divisor) {
              for (float three = 0; three &lt;= 1.0f; three += divisor) {
                  UIColor *color = [UIColor colorWithRed:one green:two blue:three alpha:.5];
                  // also bad
                  // UIColor *color = [UIColor colorWithHue:one saturation:two brightness:three alpha:.5];
                  [retVal addObject:color];
              }
          }
      }
      return retVal;
  }
  </code></pre>
  
  <p>and, as I suspected, the colors come out horribly out of order (to the eye). The reds are not with the reds, purples not with the purples, etc. </p>
  
  <p>Is there no easy way to create a list of diverse colors, nicely grouped according to human criteria like, "that looks blue?"</p>