Skip to main content

Colorset management classes

Project description

Colorset

A set of classes for working with color legends.

Usage

To use the library, you need to import it and call the function getLegend(cs_file, sys_cs_file, colorset_used), where cs_file is the full name of the main legend XML file, sys_cs_file is the full name of the additional legend XML file, and colorset_used is the name of the desired legend.

The function returns a tuple legend, colorType, where legend is an object of the class ColorSetNumerical, ColorSetString, or ColorSetAutomatic, depending on the contents of the legend files, and colorType is a string indicating the type of legend from the list ['numerical', 'string', 'automatic'].

The following methods are supported:

show() - displays the contents of the legend in the standard console. createDescription() - automatically fills in the description property. valueToColor(value) - calculates the integer color code based on the parameter value.

Required Files

Main and additional XML files containing the color legends.

Integration

The library requires the presence of lxml.etree for operation.

Related Projects

The library was developed for use with its own projects.

Future Plans

Implementation of the ability to edit legends and save them in XML files. Integration to work with a PostgreSQL database. Preparation of a GUI - a visual legend editor.

Current Status

Debugging.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colorset-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colorset-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file colorset-1.0.0.tar.gz.

File metadata

  • Download URL: colorset-1.0.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for colorset-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1238f55cadb6f0162e6c19e48229dedbe288b9870358eca7797f9fcfd589ad29
MD5 f36fc55fe292eaf60364af449408998f
BLAKE2b-256 affafd997594f5396d9d1db985627e8a1cef0baaf56c78bb9463c24cbf7b92e1

See more details on using hashes here.

File details

Details for the file colorset-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: colorset-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for colorset-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc4a48caea6332f631473f8fc62d2871e4c7d0bc65f9aa54eaca8496042b23a5
MD5 fa92235ad315094c4f97b2c2d002d637
BLAKE2b-256 a166f73b7f8d8585d3bc7edcb29eb269fa0d26bd1692375da79f1622d95097ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page