Abstract
Inspired by the art and color research of Sanzo Wada (1883-1967), his "Dictionary Of Color Combinations" (2011, ISBN:978-4861522475), and the interactive site by Dain M. Blodorn Kim, this package brings Wada's color combinations to R for easy use in data visualizations. This package honors 60 of Wada's color combinations: 20 duos, 20 trios, and 20 quads.
Introduction
In the field of data visualization, the selection of an appropriate color palette is a critical decision that influences both the clarity and the aesthetic appeal of the final graphic. While standard libraries such as Viridis or ColorBrewer provide reliable defaults, there is a persistent demand for palettes rooted in established color theory and artistic tradition.
The sanzo R package addresses this need by digitizing the historical color research of Japanese artist and researcher Sanzo Wada (1883-1967). Wada was a pioneer in the study of color interaction, and his seminal work, "A Dictionary of Color Combinations," published in the 1930s, remains a landmark in the field. By bringing these curated combinations into the modern data science workflow, sanzo allows researchers to apply sophisticated, artistically-grounded theory to their visualizations.
Package Architecture and Methods
The sanzo package is designed as a curated repository of hexadecimal color codes, optimized for seamless integration into the R ecosystem. Rather than relying on generative algorithms, the package provides direct access to 60 specific combinations derived from Wada's research.
Core Functions
The package provides specialized functions for different palette sizes:
sanzo.duo(): Returns 2-color palettes.sanzo.trio(): Returns 3-color palettes.sanzo.quad(): Returns 4-color palettes.
Users can call these palettes using short-form IDs (e.g., "c006"). Additionally, the package includes utility functions like sanzo.info.all(), which provides a data frame containing long-form names, IDs, and links to original source material, ensuring that the historical context of each palette is preserved.
Visualization and Previewing
To facilitate the selection process, sanzo includes built-in demonstration functions. These functions generate base R plots that allow users to preview the palettes in a practical context before implementation.
Data and Palette Composition
The primary "dataset" within the package consists of 60 distinct color palettes:
- 20 Duo palettes (2 colors)
- 20 Trio palettes (3 colors)
- 20 Quad palettes (4 colors)
These palettes are returned as vectors of hexadecimal strings, making them natively compatible with base R plotting functions and easily integrated into ggplot2 workflows via standard color mapping functions.
Key Insights
The sanzo package represents a bridge between early 20th-century art history and 21st-century data visualization. By focusing on duos, trios, and quads, the package is particularly well-suited for categorical data visualization, where distinct and harmonious groupings are essential for effective communication. The inclusion of demo functions reflects a user-centric design philosophy, acknowledging that palette selection is inherently a visual and iterative process.
Limitations and Future Directions
While the current release provides a robust set of 60 palettes, several areas for future development remain:
- Palette Scaling: The package currently offers fixed-length palettes. While users can manually interpolate these into continuous scales, built-in support for color "ramping" would enhance utility for heatmaps and continuous data.
- Expanded Scope: Wada’s original dictionary contained 348 combinations. Future iterations of the package could expand to include the full breadth of his research.
- Accessibility: Future updates should include assessments of color-blind accessibility (CVD-friendliness) to ensure that these artistically-derived palettes also meet modern standards for inclusive design.
Conclusion
The sanzo package offers a unique resource for R users, providing access to a rich heritage of Japanese color theory. By digitizing Sanzo Wada's work, the package empowers data scientists to create visualizations that are not only technically sound but also artistically sophisticated.
Summary updated