Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

color-tol

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-tol

Optimized color schemes for data display

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

color_tol: Colour maps for analysis

This Python package is meant to complement the wonderful work by Cynthia Brewer, using the work of Paul Tol, where he introduced a very rigorous set of colors that were clearly identifyable for those with or without color-blindness. His work can also be found under the docs folder of this package.


Use

Three different color maps - qualitative, sequential, and diverging - are available, either in RGB or HTML codes.

To access any of them, you call the functions

qualitative(<number>)

sequential(<number>)

diverging(<number>)

where the <number> represents the number of colors you wish.

E.g.,

>>> my_map = qualitative(7)
>>> my_map.html_colors
['#332288', '#88CCEE', '#44AA99', '#117733', '#DDCC77', '#CC6677', '#AA4499']

>>> my_map.rgb_colors
[(51, 34, 136), (136, 204, 238), (68, 170, 153), (17, 119, 51), (221, 204, 119), (204, 102, 119), (170, 68, 153)]

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc