-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] #7723 - Adding Support For '0x' Notation Color Format #11157
Comments
Comment by petetnt Hi if the issue is that tinycolor doesn't support function asRGB(color) {
if (/0x/.test(color)) {
return color.replace("0x", "#");
}
return color;
}
/** somewhere down the line where tinycolor is called **/
tinycolor(asRGB(this._getColor())
// when and only when you need the actual color value (for example presentation) convert it to 0x format:
if (this._format === "0x") {
return color.toHexString().replace("#", "0x");
}
return color.toHexString(); |
Comment by ficristo
|
Comment by zaggino
|
Comment by nyteksf Okay. Firstly, I just want to take a moment to thank you guys, once again, for helping me--each one of these feedback sessions has been worth at least a million articles or book pages by dint of contrast. That said, in response to my most recent changes, I think I have satisfied your associated change requests. Or no? Please let me know if otherwise, and again, I will hop to that so I can get onto the next one. Good times. :) |
Comment by zaggino Just two of my comments, lets wait for |
Comment by nyteksf Okay. The latest change requests have been fulfilled, or so I believe. As always--please don't hesitate to let me know if there're any more in mind. Otherwise, thanks again. And see you again soon. :)
|
Comment by zaggino Looks good now except one place where the code is incorrectly indented, it'd be a good thing to install |
Comment by nyteksf :) |
Comment by zaggino Merged, thanks |
Comment by petetnt Great job |
Issue by nyteksf
Tuesday Mar 07, 2017 at 01:44 GMT
Originally opened as adobe/brackets#13154
Hello. Could somebody please point me in the right direction from here where I am stuck? I have implemented the RegExp used to find "0x..." format colors which are entered as input. I have also added the associated button, and plugged in the related code that it might be used (for the most part). However, I'm now having trouble linking everything up in a non-hackish way (or at all) in large part because tinycolor doesn't recognize 0x notation. As a result I cannot get the color swatches to work, or 0x notation to be easily recognized by the given methods of tinycolor like .getFormat() which is for example used with a switch case in Brackets for control flow. Thanks in advance to anyone who can lend me their support! :)
@
zagginonyteksf included the following code: https://github.com/adobe/brackets/pull/13154/commits
The text was updated successfully, but these errors were encountered: