Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Release Alpha and Propose Stable

on:
workflow_dispatch:
pull_request:
types: [closed]
branches: [dev]

jobs:
publish_alpha:
if: github.event.pull_request.merged == true
uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master
secrets: inherit
with:
Expand All @@ -23,7 +23,7 @@ jobs:
needs: publish_alpha
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Send message to Matrix bots channel
id: matrix-chat-message
uses: fadenb/[email protected]
Expand Down
14 changes: 5 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# Changelog

## [0.0.8a2](https://github.com/OpenVoiceOS/ovos-color-parser/tree/0.0.8a2) (2025-03-30)
## [0.0.9a1](https://github.com/OpenVoiceOS/ovos-color-parser/tree/0.0.9a1) (2025-10-26)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-color-parser/compare/0.0.8a1...0.0.8a2)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-color-parser/compare/0.0.8...0.0.9a1)

**Merged pull requests:**

- es-es/translate [\#27](https://github.com/OpenVoiceOS/ovos-color-parser/pull/27) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))

## [0.0.8a1](https://github.com/OpenVoiceOS/ovos-color-parser/tree/0.0.8a1) (2024-12-11)
**Fixed bugs:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-color-parser/compare/0.0.7...0.0.8a1)
- Error with black color [\#29](https://github.com/OpenVoiceOS/ovos-color-parser/issues/29)

**Merged pull requests:**

- de-de/translate [\#24](https://github.com/OpenVoiceOS/ovos-color-parser/pull/24) ([gitlocalize-app[bot]](https://github.com/apps/gitlocalize-app))
- fixes https://github.com/OpenVoiceOS/ovos-color-parser/issues/29 [\#30](https://github.com/OpenVoiceOS/ovos-color-parser/pull/30) ([builderjer](https://github.com/builderjer))



Expand Down
2 changes: 1 addition & 1 deletion downstream_report.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ovos-color-parser==0.0.8a1
ovos-color-parser==0.0.8
└── ovos-skill-color-picker==0.0.7 [requires: ovos-color-parser]
6 changes: 5 additions & 1 deletion ovos_color_parser/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ def match_color_automaton(cls, description: str, lang: str = "en",
if s >= 0.15:
#print(f"DEBUG: matched fuzzy color -> {(n, h, s)}")
weights.append(s)
candidates.append(HLSColor.from_hex_str(h, name=n))
try:
candidates.append(HLSColor.from_hex_str(h, name=n))
except ValueError as e:
#print(f"DEBUG: {e}")
pass
else:
hex_strs = cls.match_automaton(automaton, description)
for hex_str in hex_strs:
Expand Down
13 changes: 10 additions & 3 deletions ovos_color_parser/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ def hex_str(self) -> str:
def from_hex_str(hex_str: str, name: Optional[str] = None, description: Optional[str] = None) -> 'sRGBAColor':
if hex_str.startswith('#'):
hex_str = hex_str[1:]
r = int(hex_str[0:2], 16)
g = int(hex_str[2:4], 16)
b = int(hex_str[4:6], 16)
if len(hex_str) == 6:
r = int(hex_str[0:2], 16)
g = int(hex_str[2:4], 16)
b = int(hex_str[4:6], 16)
elif len(hex_str) == 3:
r = int(hex_str[0:1] * 2, 16)
g = int(hex_str[1:2] * 2, 16)
b = int(hex_str[2:3] * 2, 16)
else:
raise ValueError(f"Invalid hex sting {hex_str}")
return sRGBAColor(r, g, b, name=name, description=description)

def __post_init__(self):
Expand Down
4 changes: 2 additions & 2 deletions ovos_color_parser/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 0
VERSION_MINOR = 0
VERSION_BUILD = 8
VERSION_ALPHA = 0
VERSION_BUILD = 9
VERSION_ALPHA = 1
# END_VERSION_BLOCK