In categorical data visualization, appropriate color arrangements can avoid perceptual ambiguity and help perceive underlying data patterns. We introduce a protocol to assign contrastive colors to neighboring categories using both Python and R packages. We describe steps for calculating the interlacement between clusters and generating a proper color palette and calculating color contrast. We then detail procedures for aligning cluster interlacement and color contrast to get an optimized cluster-color assignment, achieving clear categorical visualization. For complete details on the use and execution of this protocol, please refer to Jing et al.1.
Keywords: Single cell; bioinformatics; computer sciences.
Copyright © 2024 The Authors. Published by Elsevier Inc. All rights reserved.