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

Shoes color name mappings should be in Scarpe-Components #504

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

Shoes color name mappings should be in Scarpe-Components #504

noahgibbs opened this issue Dec 13, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers KWoC-2023 IIT Kharagpur Winter of Code 2023 - good for new contributors

Comments

@noahgibbs
Copy link
Collaborator

Right now we have a bunch of Shoes color mappings in lacci/lib/shoes/colors.rb. For example, search on "aquamarine". In a lot of cases we depend on the web browser to have the same RGB values for colors that Shoes does. For instance, if you set an oval's fill color to "aquamarine", right now it will literally use that for the fill in the HTML style attribute. Not the RGB equivalent of it, but literally the word "aquamarine".

It would be good to move the color mappings into a Scarpe-Component, and then have Lacci use that component for its color mapping. Then we could easily have Calzini do the same mapping by using the same component. It's not good to have Scarpe-Components depend on Lacci, but it's fine to have Lacci depend on Scarpe-Components (it already does.)

The other methods in that file (e.g. to_rgb) could go in the same component or not. You can look at it and decide which makes more sense.

@noahgibbs noahgibbs added enhancement New feature or request good first issue Good for newcomers KWoC-2023 IIT Kharagpur Winter of Code 2023 - good for new contributors labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers KWoC-2023 IIT Kharagpur Winter of Code 2023 - good for new contributors
Projects
None yet
Development

No branches or pull requests

1 participant