znjameswu / flutter_math

Math rendering and editing in pure Flutter.
https://znjameswu.github.io/flutter_math_demo/
Apache License 2.0
123 stars 52 forks source link

Support dvipsnames colors #30

Open creativecreatorormaybenot opened 3 years ago

creativecreatorormaybenot commented 3 years ago

I think it would be useful if all dvipsnames colors would be supported as colors via name:

Apricot       Aquamarine Bittersweet       Black Blue       BlueGreen BlueViolet       BrickRed Brown       BurntOrange CadetBlue       CarnationPink Cerulean       CornflowerBlue Cyan       Dandelion DarkOrchid       Emerald ForestGreen       Fuchsia Goldenrod       Gray Green       GreenYellow JungleGreen       Lavender LimeGreen       Magenta Mahogany       Maroon Melon       MidnightBlue Mulberry       NavyBlue OliveGreen       Orange OrangeRed       Orchid Peach       Periwinkle PineGreen       Plum ProcessBlue       Purple RawSienna       Red RedOrange       RedViolet Rhodamine       RoyalBlue RoyalPurple       RubineRed Salmon       SeaGreen Sepia       SkyBlue SpringGreen       Tan TealBlue       Thistle Turquoise       Violet VioletRed       White WildStrawberry       Yellow YellowGreen       YellowOrange

The hex codes can be found in the source:

Click to expand ```html Apricot       Aquamarine Bittersweet       Black Blue       BlueGreen BlueViolet       BrickRed Brown       BurntOrange CadetBlue       CarnationPink Cerulean       CornflowerBlue Cyan       Dandelion DarkOrchid       Emerald ForestGreen       Fuchsia Goldenrod       Gray Green       GreenYellow JungleGreen       Lavender LimeGreen       Magenta Mahogany       Maroon Melon       MidnightBlue Mulberry       NavyBlue OliveGreen       Orange OrangeRed       Orchid Peach       Periwinkle PineGreen       Plum ProcessBlue       Purple RawSienna       Red RedOrange       RedViolet Rhodamine       RoyalBlue RoyalPurple       RubineRed Salmon       SeaGreen Sepia       SkyBlue SpringGreen       Tan TealBlue       Thistle Turquoise       Violet VioletRed       White WildStrawberry       Yellow YellowGreen       YellowOrange ```
creativecreatorormaybenot commented 3 years ago

@znjameswu Nevermind me 🙈 I just realized that you already did that, however, you seem to have messed up cyan and because cyan was not working for us, I assumed that the other ones were not working either.

I will open a PR 😄

creativecreatorormaybenot commented 3 years ago

I fixed cyan in #31 now - I wonder if the other ones are actually dvipsnames (given that there are taken from https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).

It might be worth to recreate the file with the colors from above. Let me know if you agree, I would want to make a PR :)

creativecreatorormaybenot commented 3 years ago

I wonder @znjameswu - was it a coincidence that we both chose the Mozilla CSS colors? (see my code)

Back then, I did not really think about dvipsnames, however, I do think that dvips is the better approach :)

If you agree, I would quickly generate the corrected colors and update them in both repos (in preparation of CaTeX being maintained again.. at some point 😄).