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
feat(color): added utilities and improved color parsing performance #9110
feat(color): added utilities and improved color parsing performance #9110
Conversation
Should fill most needs and remove the need for external libs like tinycolor
* no need to constantly test for SHARP * drop the regexp test. Testing for first char SHARP is enough as it will still throw an error if the color is not valid * faster hex method thus also toString method
Fixed hsl and hsv methods
|
@farfromrefug when get a chance possible to resolve the conflicts and we could get this into 8.1? |
|
@NathanWalker i want to but i don't understand some changes you made when you merged the first one. Same thing with I ll fix the rest when we ve decided on this. |
|
@NathanWalker i just realized that it was a bit worse that i thought. The changes you made when you rewrote my original PR actually broke most of the colors functions (released in 8.x). |
# Conflicts: # packages/core/color/color-common.ts
|
@NathanWalker i updated the PR and fixed everything. AS a note currently in N all color functions based on hsl/hsv are broken |
|
@NathanWalker I still need to push one last fix on the hex getter |
allow Color constructor to take hsl/hsv
|
@NathanWalker this PR really fixes a lot. I just added a fix for |
|
@NathanWalker do we have tests for linear-gradient parsing ? (Not in front of my computer). I changed lot to refactor and handle all colors parsing in Color class. Would be good to ensure all that is good |
0ff2221
into
NativeScript:release/8.1.0
This is second part of my last PR about adding features to Color. It actually can replace the last PR. And it does more:
Colormuch faster. Running profiling in my apps i realizedColorwas pretty slow.hexmethod was dead slow._argbis now used to create thehexstring.The text was updated successfully, but these errors were encountered: