Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity transformation #65

Open
morrijr opened this issue Feb 21, 2019 · 6 comments
Open

Identity transformation #65

morrijr opened this issue Feb 21, 2019 · 6 comments

Comments

@morrijr
Copy link

morrijr commented Feb 21, 2019

Hi,

I started using your library to convert from an undefined source to hsv. Without thinking I ended up coding a colorConvert.hsv.hsv conversion, which obviously doesn't exist. Would it be possible/reasonable to add a a no-op or identity transformation (ie output = input) when source and destination during the route construction?

At the moment I've trapped it an dealt with it specially, but it would be really nice not to have to have different code in the transformation path :)

Thoughts?

@Qix-
Copy link
Owner

Qix- commented Feb 21, 2019

Feel free to PR :)

@morrijr
Copy link
Author

morrijr commented Feb 21, 2019

Hi,

I forked the project and made a stab at the changes (fork) but I've two failing tests... lines 118 and 120 in test/basic.js.

assert.deepStrictEqual(convert.ansi16.ansi16(103), 103);
assert.deepStrictEqual(convert.ansi256.ansi256(175), 175);

But I'm afraid my javascript isn't yet up to diagnosing why. Would you have a little time to take a look (no rush!). I wouldn't be comfortable doing a PR without the tests.

Thanks,
J.

@Qix-
Copy link
Owner

Qix- commented Feb 22, 2019

Feel free to open a PR and I can take a look, even if the tests are failing :)

@morrijr
Copy link
Author

morrijr commented Feb 22, 2019

PR #66 created (failing tests commented out for now).

I'll close this issue and we can continue on the PR?

@morrijr morrijr closed this as completed Feb 22, 2019
@Qix- Qix- reopened this Feb 22, 2019
@Qix-
Copy link
Owner

Qix- commented Feb 22, 2019

Nah we'll leave this open until it's done :)

@morrijr
Copy link
Author

morrijr commented Jul 20, 2019

's been a while, anything I can do to progress this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants