Color Cycle Survey

A previous post about randomly generating color sets with a minimum perceptual distance addresses the technical aspects of generating sets of colors that are visually distinct for those with normal color vision as well as for those with color vision deficiencies. However, it does not address the aesthetic aspect, which I will start to address here. To create an aesthetically pleasing color cycle—an ordered set of colors for visualizing categorical data—two aspects need to be addressed, the colors that are used and the order that they are used in. While one could take an ontological approach to this by trying to define a set of rules that make a pleasing color cycle, as is done by I Want Hue,1 such a method is error-prone and substantially biased toward the personal preferences of the drafter of the rules. Instead of using ontologies, an alternative approach that is gaining traction in many fields is to infer a pattern from a large data set using machine learning techniques. This is the approach I wish to pursue.

To this end, I’ve created a Color Cycle Survey. After presenting the user with an introduction, colorblindness questionnaire, and directions, the primary survey starts. In it, the user is presented with two color sets and is asked to choose the one that is, in the user’s opinion, more aesthetically pleasing. Then, four orderings of the chosen set are displayed, and the user again makes a selection to taste. This basic process is then repeated again and again, with sets of either six, eight, or ten colors. For the choice of color set, each set is presented ordered by hue, since this makes the two sets easier to compare than if they were randomly ordered (or ordered by RGB values). Only two sets are presented, to make for an easier choice. Additionally, a line plot or scatter plot rendering is shown with each color set. For the choice of ordering, four orders are presented, since multiple orderings are easier to compare than sets, since the colors are all the same. I considered asking the user to order the colors to taste, instead of presenting possible orderings, but I decided that while such an approach yields more information per response, it takes much longer and requires more effort, so each user will likely respond many fewer times. Thus, I went with the simpler approach.

If all goes well, I’ll amass a sizable data set from the survey, which will remain available for at least a few months. Once I have data to experiment with, I’ll work out the exact analysis method. In addition to generating an “optimal” color cycle, it would also be interesting to create a model that allows for additional constraints, such as being able to choose the first color or being able to choose the exact number of colors in the cycle. Once anonymized, I’ll release the survey data under a permissive license, probably CC BY 4.0 (I’m open to suggestions). Any generated color cycles will be release into the public domain via the CC0 public domain dedication.


  1. I Want Hue takes a fairly rudimentary approach to color vision deficiency simulation, which I find lacking; I personally have difficulty differentiating colors in the many of the sets it generates, even when its colorblind mode is turned on. It also doesn’t really address the ordering of the color set into a cycle.  

Posted in , , | Tagged , , , , | Leave a comment

Randomly Generating Color Sets with a Minimum Perceptual Distance

Earlier this year, I released a color cycle picker that enforces a minimum perceptual distance between colors, including color vision deficiency simulations, with the goal of creating a better color cycle to replace the “category 10” color palette used by default in Matplotlib, along with other data visualization packages. While the picker works well for what it was designed for—allowing a user to create a color cycle—it requires user intervention to create color sets or cycles.1 The basic technique used—performing color vision deficiency simulations2 for various types of deficiencies and enforcing a minimum perceptual difference for the simulated colors using the CAM02-UCS3 perceptually uniform color space (where each type of deficiency is treated separately) and a minimum lightness distance (for grayscale)—is still valid for the random generation of color sets; it just needs to be extended to randomly sample the color space.


Continue reading


  1. A color set doesn’t have a defined order, while a color cycle does. 

  2. G. M. Machado, M. M. Oliveira, and L. A. F. Fernandes, “A Physiologically-based Model for Simulation of Color Vision Deficiency,” in IEEE Transactions on Visualization and Computer Graphics, vol. 15, no. 6, pp. 1291-1298, Nov.-Dec. 2009. doi:10.1109/TVCG.2009.113  

  3. Luo M.R., Li C. (2013) CIECAM02 and Its Recent Developments. In: Fernandez-Maloigne C. (eds) Advanced Color Image Processing and Analysis. Springer, New York, NY. doi:10.1007/978-1-4419-6190-7_2  

Posted in , | Tagged , , , , , | Leave a comment

3D-Printed Hilbert Curve Absorbers

Fused filament fabrication (FFF) 3D printers are good for many things,1 but production of sharp points is not among those strengths. Thus, the traditional structure of millimeter wave absorbers—a periodic array of square pyramids—is poorly suited for production via FFF printers. Millimeter wave absorbers serve a crucial role in Cosmic Microwave Background (CMB) telescopes by terminating stray light, which is necessary for reducing systematic errors. Not only are the points difficult to produce; they’re also fragile, since a print is generally weakest along its layer lines. Thus, a new geometry was needed, as is detailed in my paper titled A 3D-printed broadband millimeter wave absorber.

Space-filling curves such as the Hilbert curve completely fill the unit square. Furthermore, the Hilbert curve can be described by a sequence of physically realizable geometric approximations. Tracing a wedge along such an approximation creates a geometry with similar optical properties as a pyramidal array but with enhanced mechanical robustness. Importantly, this geometry can be printed without repeatedly starting and stopping extrusion, making it well suited for FFF printers.

Hilbert Curve Absorber (Detail) Continue reading


  1. A LulzBot TAZ 6, in this case. 

Posted in | Tagged , , , , | 1 Comment

Geysers del Tatio

I recently returned from a couple months working in Chile. While there, I finally made it out to see the El Tatio geyser field, which is the third largest geyser field in the world. The geysers are around an 80 km, hour and a quarter drive north of San Pedro de Atacama and are normally seen just before sunrise. Some photos I took are below.

Geyser Field Continue reading

Posted in | Tagged , , | Leave a comment

Photogrammetry Targets

The Scanreference photogrammetry system includes 149 magnetic coded targets and PDFs for printing 192 more targets. However, while measuring something that isn’t ferromagnetic, the magnetic targets aren’t particularly helpful, and the 192 printable coded targets aren’t always enough. Unfortunately, AICON wouldn’t provide the full set of printable coded targets when I asked and instead tried to sell me a multi-thousand dollar software package for generating printable coded targets. Instead, I looked in the literature and found multiple references to a 1991 paper1 as the original publication about the ring code targets. Unfortunately, the paper is not available electronically, so I had to request a copy via interlibrary loan; I received a copy just to find out that it didn’t include any technical details on the targets.

Fortunately, further research turned up expired German patent DE19733466A1. The patent contains all of the details needed to generate the ring codes for the coded targets, except for the exact parameters and numbering scheme used for the Scanreference targets. This missing information was fairly straightforward to figure out—the targets are 14-bit with no restrictions on the number of transitions from black segments to white segments and are ordered by increasing binary value. With this information, I was then able to write a script to generate the ring codes and a script to generate a set of printable targets, resulting in a PDF with all 516 targets ready to print on stickers.


  1. Schneider, C. T. “3-D Vermessung von Oberflächen und Bauteilen durch Photogrammetrie und Bildverarbeitung.” Proc. IDENT/VISION 91 (1991): 14-17.  

Posted in , | Tagged , | Leave a comment