Skip to content

fix(hsv): name rgb2hsv converter correctly - #398

Merged
gka merged 1 commit into
gka:mainfrom
xianjianlf2:fix/rgb2hsv-function-name
Sep 14, 2026
Merged

gka merged 1 commit into
gka:mainfrom
xianjianlf2:fix/rgb2hsv-function-name

Conversation

@xianjianlf2

Copy link
Copy Markdown
Contributor

What changed

Rename the internal converter function in src/io/hsv/rgb2hsv.js from rgb2hsl to rgb2hsv.

Why

The file implements and exports RGB-to-HSV conversion, but the local function name still said rgb2hsl. This is confusing when reading stack traces, debugging, or navigating the source, and it was reported in #363.

Fixes #363

Validation

  • npm test -- test/io/rgb2hsv.test.js --run
  • pre-commit ran npm run lint and full npm test successfully: 50 test files, 2519 tests

@xianjianlf2
xianjianlf2 requested a review from gka as a code owner August 1, 2026 08:42
@changeset-bot

changeset-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5fe5e4c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@lbesecker195 lbesecker195 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked src/io/hsv/rgb2hsv.js on main: rgb2hsl appears only at the declaration (line 10) and the default export (line 32), and src/io/hsv/index.js imports the default as rgb2hsv, so renaming the local binding changes nothing at runtime and just fixes the misleading name from #363. LGTM.

@gka gka left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

@gka
gka merged commit c8a3339 into gka:main Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The function defined inside src/io/hsv/rgb2hsv.js is called rgb2hsl, while it should be called rgb2hsv?

3 participants