-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
reHSLa and reRGBa ignore case #5017
Conversation
ignore case for rgba
fabric.Color.reRGBa regex ignore case
ignore case for hsla
fabric.Color.reRGBa regex ignore case
I think this is OK. |
Do you mind adding a small test to the suite to test it? like at file test/unit/color.js |
added test case for RGB/RGBA and HSL/HSLA (uppercase)
test case RGBA / HSLA
I added. |
test/unit/color.js
Outdated
oColor.setSource([255,255,255,0.8]); | ||
assert.equal(oColor.toHexa(), 'FFFFFFCC'); | ||
oColor.setSource([255,255,255,0.1]); | ||
assert.equal(oColor.toHexa(), 'FFFFFF1A'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can i ask you the reason of this change here? i remember this one was here because of weird decimals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed that to original
* fabric.Color.reRGBa regex ignore case ignore case for rgba * fabric.Color.reHSLa ignore case ignore case for hsla * test case RGBA / HSLA added test case for RGB/RGBA and HSL/HSLA (uppercase) * Update color.js
ignore case for rgba and hsla, as if pass in uppercase it was returning default color