Secretcolors

Latest version: v1.2.6

Safety actively analyzes 681874 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.2.6

Removed dependency on `numpy` (Thanks to [ri0t](https://github.com/ri0t))

1.2.5

New Color Palette `material-accent` which supports accent colors of Google
Material Design Color Palette.

1.2.3

Added new method to `Palette` class. `Palette.cycle()` will return a
generator to produce infinite color cycle. Read documentation for
further
details.

1.2.2

Fixed bug where `Palette.random()` raising error if `no_of_colors`
parameter is greater than one.

1.2.1

Removed the restrictions from `numpy` version [ see [Issue](https://github.com/secretBiology/SecretColors/issues/4) ]

1.2.0

This is one of the major updates since the conception of this project. Many
changes are essential for robust functionality and proper code maintenance
. This
has introduced the following important changes
* Probably the most important change in this version is return values. Any
color you generate with this library will return `ColorString` or
`ColorTuple` (depending on `color_mode`) which are subclasses of `str` and
`tuple` respectively. This will NOT change anything in your workflow. Check the full documentation for its
use cases.
* `SecretColors.palettes` is now `SecretColors.models.palettes.Palette
`. However, if
you have used `from SecretColors import palette`, your code will NOT be
impacted. We recommend importing this way.
* `ColorMap` is now `SecretColors.cmaps.ColorMap`. You should import it as
`from SecretColors.cmaps import ColorMap`
* `Palette.color_between` is now deprecated. Use `utils.color_in_between
` instead. Using this function will raise `AttributeError`.
* Using shade value less than 0 or greater than 100 will throw a `ValueError`.
* `allow_gray_shades` argument from `Palette` is deprecated and will be
ignored.
* `ignore_gray` and `force_gray` arguments from `Palette.random()` are
deprecated and will be ignored.
* `starting_shade` and `ending_shade` values (if not provided by user) will
be set to minimum and maximum shades available in that palette instead 0
and 100.

What's New?
* New return class `ColorString` and `ColorTuple`
* New `ColorWheel` for more scientific use
* New color palette: Tableau
* Rewritten `ColorMap` class with new usage and easy colormap access to
famous color palettes.
* New `Palette.get()` function which supports all X11 and W3 standard names.
* Many new RGB space conversions (including *XYZ, adobe, srgb, lab* etc)
* Many new utility methods (check documentation for details)
* And of course, fixed many bugs!

Known Issues
Pycharm type-hinting not working for 'color methods'

We have shifted to custom decorators for dynamically creating
documentation of many class methods. However, due to this change
, Pycharm will not show typehint for 'color methods' It is known [bug
](https://youtrack.jetbrains.com/issue/PY-30190) in PyCharm regarding type hinting.

Converted RGB/CMYK values are not exact

This issue arises when one performs multiple conversion (specially the one
involving floating points). For example, take a look at following code,

python
from SecretColors.utils import rgb_to_hex, hex_to_rgb

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.