Skip to content

Conversation

@jitheshgopan
Copy link

Had some bug in LAB to RGB conversion.
Example :

lab = {
                l : 12.319070000421839,
a: 32.79724522241495,
b: 19.351723549763015
              }
    rgb = Color.convert(lab, 'rgb');

The problem being:

  • _round sometimes has to round values in exponential form. The regex doesn't consider that. So we could use toFixed first and parse via regex.
  • A bug in validate function - empty check with '!' which considered 0 as empty (invalid) and assigned minimum value for it. Updated the check considering that.

And used qunit(installed via bower) for testing the case.

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.

1 participant