Skip to content

Commit

Permalink
Fix issue with API update (facelessuser#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser authored May 21, 2024
1 parent bf6a2ca commit 5d44541
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ColorHelper

## 6.4.1

- **FIX**: Fix regression due to not accounting to API change when
upgrading to latest ColorAide.

## 6.4.0

- **NEW**: Opt into Python 3.8.
Expand Down
6 changes: 3 additions & 3 deletions ch_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def get_channel(self, channel, label, color_filter, mode='undefined'):
clone = self.color.clone()
show_alpha = color_filter == 'alpha'

coord = alg.no_nan(clone[color_filter])
coord = clone.get(color_filter, nans=False)
if color_filter != 'hue':
rounded = alg.round_half_up(coord, 2 if mode != 'hsluv' else 0)
clone[color_filter] = rounded
Expand All @@ -514,7 +514,7 @@ def get_channel(self, channel, label, color_filter, mode='undefined'):

first = True
while count:
coord = alg.no_nan(clone[color_filter]) - step
coord = clone.get(color_filter, nans=False) - step
clone[color_filter] = coord

if color_filter != "hue" and (coord < 0 or coord > (1 * scale)):
Expand Down Expand Up @@ -564,7 +564,7 @@ def get_channel(self, channel, label, color_filter, mode='undefined'):
clone.update(self.color)
clone[color_filter] = rounded
while count:
coord = alg.no_nan(clone[color_filter]) + step
coord = clone.get(color_filter, nans=False) + step
clone[color_filter] = coord

if color_filter != "hue" and (coord < 0 or coord > (1 * scale)):
Expand Down
1 change: 1 addition & 0 deletions messages/recent.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ A restart of Sublime Text is **strongly** encouraged.

Please report any issues as we _might_ have missed some required updates
related to the upgrade to stable `coloraide`.

## 6.4.0

- **NEW**: Opt into Python 3.8.
Expand Down
2 changes: 1 addition & 1 deletion support.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import webbrowser
import re

__version__ = "6.4.0"
__version__ = "6.4.1"
__pc_name__ = 'ColorHelper'

CSS = '''
Expand Down

0 comments on commit 5d44541

Please sign in to comment.