TECHNICAL FIELD

This disclosure relates generally to controlling the display of interface elements on a display device via processing of interactive data based on inputs from one or more user device with respect to the display device. Specifically, the present disclosure relates to using guided drawing inputs through interface elements representing color spaces available at computing environments to obtain color gradients for use by visualization software.

BACKGROUND

Color selection is used for various software applications that generate graphical content. For instance, data visualization software is used to automatically create graphical representations of datasets, thereby allowing users to discern valuable insights from these datasets. In a simplified example, data visualization software can generate a set of colors used to respectively represent certain data segments or other data elements. For instance, the data visualization software could select red colors to indicate “negative” data and green colors to indicate “positive” data. One method of selecting colors for visualizations is computing a path, such as a straight line or Bezier curve, between two colors in a color space. A color space is an organization of colors based on a color model, such as a lightness-chroma-hue (“LCH”) color model or a red-green-blue (“RGB”) color model.

However, color for data visualization involves using color dimensions more precisely (e.g., variations in hue, saturation, etc.). Because the physical nature of color can be modelled with values and scales that do not match how the colors are perceived by the human eye, data visualizations often need to account for color perception when finding a set of colors that represents an underlying dataset. For instance, if a color map is used for representing a sequential data set with colors from a color gradient, a user may wish to have a color gradient in which the perceived changes in color across the color gradient accurately reflect the changes in the data values across the sequential dataset.

The goals identified above can be hindered by perceptual mismatch issues. Perceptual mismatch occurs if color choices do not accurately reflect the underlying data to be represented using the colors. For instance, the human eye is able to perceive linear variations in color in terms of lightness, hue, saturation, or some combination thereof. Although the human eye perceives colors using these lightness, hue, and saturation parameters, software uses light wavelengths to drive the colors to be outputted by displays. For example, software often models colors with an RGB system, in which three wavelengths (i.e., red, green, and blue) are used to reconstruct a whole gamut of colors. Variations in RGB values do not necessarily correspond to variation in how the human eye would perceive a color. For example, if two attribute values are represented by two colors with RGB values (r, g, b) and (2r, 2g, 2b), respectively, the second attribute value is not perceived as being twice as large as the first attribute value, even though the second color is obtained by doubling the RGB values of the first color. Furthermore, changes to RGB values affect the lightness, hue, and saturation. As a result, mapping RGB values directly to data values will introduce perceptual mismatches.

Existing color selection techniques, which involve software tools for drawing a path through a color space, present disadvantages with respect to reducing perceptual mismatch in color gradients obtained using these drawn paths. In one example, existing techniques are used to define color gradients with a “start” color and an “end” color, where the shape of the path and the color space control which colors fall between the start and end colors. The path shape could be a straight line (e.g., using linear interpolation) or curved (e.g., using Bezier paths). The same path will pass through different colors, depending on the color space. Giving a user direct access to all these combinations, in a software tool, leads to many color sets that include perceptual mismatches. Reducing the perceptual mismatches often requires users to perform remedial measures, such as manually add additional colors between the start and end colors, to review supporting visualizations for assessing whether a color set is perceptually suitable for data visualization, or some combination thereof. These remedial measures therefore lack intuitive interface features for efficiently selecting color sets that involve a sufficiently small amount of perceptual mismatch.

Therefore, existing techniques include disadvantages such as, but not limited to, those described above.

SUMMARY

Certain embodiments involve using interactive color map paths through color spaces available at computing environments to obtain color gradients usable for color maps in visualization software. For instance, a computing device receives a user input (such as a mouse click) identifying a start point of a color map path and an additional user input (such as a second mouse click) identifying the end point of a color map path. A color selection engine computes a color map path between the start point and the end point of the color map path. The color selection engine constrains the color map path such that the color map path traverses representations of colors having perceptually uniform transitions between one or more of lightness, chroma, and hue. A uniform transition between one or more of lightness, chroma, and hue reduces a perceptual mismatch between colors and data, and improves the quality of the colors used for data visualizations. The color selection engine selects a color gradient having a first color corresponding to the start point of the color map path. The color selection engine also selects a second color corresponding to the end point of the color map path. In some cases, the color selection engine selects additional colors corresponding to additional points along the color map path. The color selection engine selects the first point, the second point, and the additional points such that a color gradient including the first color, second color, and additional colors has uniform transitions between the one or more of lightness, chroma, and hue. The color selection engine generates a color map for visually representing a range of data values. In an embodiment, the color selection engine generates a color map that with the first color mapped to a minimum data value of the color gradient, the second color is mapped to maximum data value of the color gradient, and the additional colors are respectively mapped to additional values within the range of data values. The color selection engine may provide the color map to any number of data visualization applications.

These illustrative embodiments are mentioned not to limit or define the disclosure, but to provide examples to aid understanding thereof. Additional embodiments are discussed in the Detailed Description, and further description is provided there.

