Skip to content

Commit 8c4c46b

Browse files
authored
Merge branch 'main' into ghuser_wheel
2 parents 5f3af70 + 3792616 commit 8c4c46b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4646
* Changed `compas.geometry.curves.nurbs.NurbsCurve.__new__` to prevent instantiation of `NurbsCurve` directly.
4747
* Changed `compas_rhino.geometry.curves.new_nurbscurve_from_...` to `nurbscurve_from_...`.
4848
* Fixed `compas_ghpython` Grasshopper components not included in published pakcage.
49+
* Chnaged `compas.colors.Color.coerce` to take color as is, if it is already aninstance of `compas.colors.Color`.
4950

5051
### Removed
5152

src/compas/colors/color.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ def coerce(color):
582582
"""
583583
if not color:
584584
return
585+
if isinstance(color, Color):
586+
return color
585587
if Color._is_rgb255(color):
586588
return Color.from_rgb255(*list(color))
587589
if Color._is_hex(color):

0 commit comments

Comments
 (0)