Skip to content

Commit

Permalink
Merge branch 'main' into ghuser_wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele authored Jul 4, 2024
2 parents 5f3af70 + 3792616 commit 8c4c46b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed `compas.geometry.curves.nurbs.NurbsCurve.__new__` to prevent instantiation of `NurbsCurve` directly.
* Changed `compas_rhino.geometry.curves.new_nurbscurve_from_...` to `nurbscurve_from_...`.
* Fixed `compas_ghpython` Grasshopper components not included in published pakcage.
* Chnaged `compas.colors.Color.coerce` to take color as is, if it is already aninstance of `compas.colors.Color`.

### Removed

Expand Down
2 changes: 2 additions & 0 deletions src/compas/colors/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ def coerce(color):
"""
if not color:
return
if isinstance(color, Color):
return color
if Color._is_rgb255(color):
return Color.from_rgb255(*list(color))
if Color._is_hex(color):
Expand Down

0 comments on commit 8c4c46b

Please sign in to comment.