Skip to content
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

String names for colors should be a Scarpe extension #518

Open
noahgibbs opened this issue Dec 18, 2023 · 0 comments
Open

String names for colors should be a Scarpe extension #518

noahgibbs opened this issue Dec 18, 2023 · 0 comments

Comments

@noahgibbs
Copy link
Collaborator

In Shoes3, you can set color-based styles (fill, stroke, etc) in a few ways. For instance, you can use methods that return a color, or you can use hex-color strings.

para "YO!", fill: blue, stroke: "#F06"

What does not work is color names in a string:

para "YO!", stroke: "green" # This gives a console warning about not finding a file named green; the text is black, not green

You could make a spirited argument for the right case here. Shoes3 is letting you use a file named "green", but not allowing a file called (also legal) "#FF0066", which isn't consistent.

I'm going to make an argument that accepting the color names as strings should be a Scarpe extension, and only allowed in apps that have declared Scarpe extensions. Then we can easily allow them if we want to for some reason (turn on Scarpe extensions) but by default we'll have Shoes3 compatibility, and we'll get an error in cases where we do it accidentally.

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

No branches or pull requests

1 participant