Skip to content

build(deps): remove colour package #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/hex_colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/hex_colors_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions cosmoplots/colors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from colour import Color
from matplotlib.colors import LinearSegmentedColormap
import matplotlib.pyplot as plt
from matplotlib import cm, colors
Expand All @@ -23,7 +22,7 @@ def make_color_swatch(color_list: list) -> LinearSegmentedColormap:
"""

color_swatch = LinearSegmentedColormap.from_list(
"my_list", [Color(x).rgb for x in color_list]
"my_list", [colors.to_rgb(x) for x in color_list]
)

plt.figure(figsize=(5, 3))
Expand Down
19 changes: 2 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cosmoplots"
version = "0.1.6"
version = "0.2.0"
description = "Routines to get a sane default configuration for production quality plots."
homepage = "https://github.com/uit-cosmo/cosmoplots"
authors = ["gregordecristoforo <[email protected]>"]
Expand All @@ -11,7 +11,6 @@ readme = 'README.md'
python = ">=3.8"
numpy = ">=1.15.0"
matplotlib = ">=3.3.2"
colour = ">=0.1.5"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down