--- id: colourmap version: "1.2.1" license: MIT license_treatment: permissive maintenance: aging --- # colourmap — Python package colourmap generates an N unique colors from the specified input colormap. License: permissive · Maintenance: aging · Downloads: 131.1K/mo ## What it is and what it does Colourmap is a utility for generating and managing color palettes programmatically. It wraps matplotlib, numpy, and scipy to create unique RGB and HEX color assignments from input lists or labels, making it useful for visualization tasks where you need consistent color mapping across categories or data points. The package provides functions to generate N colors from a colormap, assign colors to input labels, convert between RGB and HEX formats, and create linear gradients between colors. It's designed for scientific and educational use, targeting developers building visualizations in Python who need deterministic, repeatable color assignment without manually managing palettes. Use it for: - Assign consistent colors to categorical data in plots based on unique labels or group IDs - Generate a palette of N distinct colors for multi-series visualization or dashboard design - Convert between RGB and HEX color formats for web and graphics applications - Create smooth color gradients between two colors for heatmaps or sequential visualizations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates unique RGB and HEX colors from input lists or colormaps, with support for color conversion and gradient creation. Yes, if you need straightforward color generation and label-to-color mapping for visualizations. The package is lightweight, has no security vulnerabilities, and its three dependencies are standard. However, the aging maintenance status (280 days since last release) means you should verify it works with your current matplotlib/scipy versions before relying on it for production work. ## Install pip install colourmap uv add colourmap poetry add colourmap ## Installing colourmap Before you install: Low friction install with three well-established dependencies (matplotlib, numpy, scipy). Package is aging—last release 280 days ago—but repo remains active and unarchived. License in practice: MIT license permits commercial and private use with minimal restrictions; safe for most projects. Quickstart: pip install colourmap from colourmap import colourmap # Generate 10 unique colors c = colourmap.generate(10) # Create colors from labels c_rgb, c_dict = colourmap.fromlist([1, 1, 2, 2, 3]) # Convert to HEX c_hex = colourmap.rgb2hex(c_rgb) Verify before relying: - Whether the package handles edge cases (empty lists, very large label sets) gracefully - Performance characteristics when working with thousands of unique labels - Compatibility with recent matplotlib/scipy versions beyond 'supports_current' ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 131.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags generate unique colors from labels, rgb hex color conversion, color mapping for visualization, matplotlib colormap wrapper, assign colors to categories, color-generation, visualization-utility [View on SkillFed](https://skillfed.io/packages/colourmap) · [View on PyPI](https://pypi.org/project/colourmap/)