No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Selecting Semantically-Resonant Colors for Data Visualization

Semantically-resonant color assignments (such as mapping "ocean" to "blue") are useful in categorical visualizations, and can facilitate value lookup and comparisons.

This repository contains C# code that assigns a set of categorical concept names to semantically-resonant colors.
The algorithm makes use of images to determine frequent and discirminative colors for each concept name. It uses Google Image Search to query for relevant images. Project page: link

Main file: SemanticColors.sln


The code has been tested on Windows 7.


Usage: SemanticColors [inFile] [outFile] [paramFile] [renderDir]
  • inFile - file with list of categories to assign colors. See sampleCategories.csv for an example
  • outFile - output file where color assignments are saved
  • paramFile - config file. See sampleParams.txt for an example where
  • imageDir - is where images of concept names will be saved
  • cacheDir - is where computed histograms will be saved and re-used
  • jsonFile - is the location of the c3_data.json file
  • apiKey - is your Google CustomSearch API key
  • cx - is your Google CustomSearch engine id
  • renderDir (optional)- If included, images of the color assignments and affinity scores for each category are saved in this directory.