Skip to content

nekitdev/colors-core

Repository files navigation

colors-core

License Version Downloads Discord

Documentation Check Test Coverage

Core color functionality.

Installing

Python 3.8 or above is required.

pip

Installing the library with pip is quite simple:

$ pip install colors-core

Alternatively, the library can be installed from source:

$ git clone https://github.com/nekitdev/colors-core.git
$ cd colors-core
$ python -m pip install .

poetry

You can add colors-core as a dependency with the following command:

$ poetry add colors-core

Or by directly specifying it in the configuration like so:

[tool.poetry.dependencies]
colors-core = "^1.1.1"

Alternatively, you can add it directly from the source:

[tool.poetry.dependencies.colors-core]
git = "https://github.com/nekitdev/colors-core.git"

Examples

>>> from colors import Color
>>> color = Color(0x000000)
>>> print(color)
#000000
>>> color.to_rgb()
(0, 0, 0)
>>> color.to_rgba(0)
(0, 0, 0, 0)
>>> color.to_hsv()
(0.0, 0.0, 0.0)

Documentation

You can find the documentation here.

Support

If you need support with the library, you can send an email or refer to the official Discord server.

Changelog

You can find the changelog here.

Security Policy

You can find the Security Policy of colors-core here.

Contributing

If you are interested in contributing to colors-core, make sure to take a look at the Contributing Guide, as well as the Code of Conduct.

License

colors-core is licensed under the MIT License terms. See License for details.