-
Notifications
You must be signed in to change notification settings - Fork 12
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
Create ColorProperty #948
Comments
Would you also have a |
Good point @jonathanolson. I think we only need one color property type, and it should use |
We have numerous Properties like Screen's If we go with The name decision should also consider how these Properties will be resented via PhET-iO. Is there any advantage for |
More thoughts on the above... More than once, I've encountered common code that was relying on something named "Color" having a |
I've also run into cases where I want things to be |
Re |
Some comments over here: It seems we are leaning toward using backgroundColorProperty = new ColorDefProperty('blue'); |
It seems it would be simpler and more useful to allow backgroundColorProperty = new ColorDefProperty('blue');
backgroundColorProperty.value.darkerColor(0.5); In that case, the value would always be a |
Have we had Properties that do implicit type conversion before? That's also not desirable in some circumstances to have ColorDefProperty upconvert |
I don't think so. |
Would you do the same conversion for The downside of this conversion would be |
Maybe we should schedule this for a PhET-iO developer discussion, because I agree that its best for our codebase to use ColorDef, but I wonder if it would be a clearer, simpler API for PhET-iO clients for it to always be a Color. But I'd like to check in with @zepumph first. What do you recommend? |
There's been no progress on this issue for over a year. But we may want to defer until we discuss #1135 (revisit "color" and "paint"). |
From phetsims/axon#221 we would like to create a custom
ColorProperty
type.The text was updated successfully, but these errors were encountered: