scarpe-team / scarpe

Scarpe - shoes but running on webview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shoes color name mappings should be in Scarpe-Components

noahgibbs opened this issue · comments

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.