Please review my article on color topics for programmers


(Peter Occil) #1

I’ve written an article bringing together many color topics of general interest to programmers and offering solutions and pseudocode. I encourage anyone to review and comment on this article. In particular, this document discusses—

  • popular formats for red-green-blue (RGB) colors,
  • several color models of practical interest, including conversion methods,
  • how to generate colors with certain properties,
  • color differences,
  • color mixing,
  • color maps,
  • how to find the dominant colors of an image, and
  • colors as spectral functions.

The article itself is open-source on GitHub; anyone with a GitHub account can also comment on the issues thread too.

Anyone who wants to comment on this article should post a reply here or a comment on the issues thread.

(Andrew) #2

hi, I just had a quick read, and whilst I don’t program, it is quite impressive I feel.
Here are some comments, bearing in mind I’m not programmer!

  1. Clamp3 seems a bit crude. Why not scale back the components in a proportionate way rather than clamping individually?
  2. Actual examples in the Color Schemes section would be nice.
  3. A lot of constants are used. Would be nice to quote where these are from, presumably some standards body usually, to give confidence that the algorithm is the “real deal”.
  4. Some low bit depth formats are mentioned. Are these relevant nowadays?
  5. In the section on blend modes, it would be interesting to include some of the ones from Gimp and P-shop such as Hard Light, Vivid Light, Burn.
    But overall, well done.

(Peter Occil) #3

I’ve made a few revisions to the article, notably in the Color Maps and Colors as Spectral Functions sections.