File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ namespaces = true
1515
1616# ----------------------------------------- Project Metadata -------------------------------------
1717[project ]
18- version = " 0.0.0.dev4 "
18+ version = " 0.0.0.dev5 "
1919name = " PyColorIT"
2020requires-python = " >=3.10"
2121dependencies = [
2222 " numpy" ,
23- " PkgData" ,
23+ " PkgData == 0.0.0.dev3 " ,
2424 " ipython" ,
2525]
Original file line number Diff line number Diff line change 11"""Create color gradients."""
2+ from __future__ import annotations
3+
4+ from typing import Literal as _Literal , Sequence as _Sequence , TYPE_CHECKING as _TYPE_CHECKING
25
3- from typing import Literal as _Literal , Sequence as _Sequence
46
57import numpy as _np
68
79from pycolorit .color import RGBColor as _RGBColor
10+ from pycolorit import color as _color
811
912
1013def interpolate (
@@ -47,6 +50,10 @@ def interpolate(
4750 Gradient colors starting with `color_start`.
4851 """
4952 explicit_alpha = multipliers and len (multipliers ) == 4
53+ if not isinstance (color_start , _RGBColor ):
54+ color_start = _color .css (str (color_start ))
55+ if not isinstance (color_end , _RGBColor ):
56+ color_end = _color .css (str (color_end ))
5057 c1 = color_start .array (
5158 system = system ,
5259 hue_wrap = hue_wrap ,
You can’t perform that action at this time.
0 commit comments