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

Translations of values for fill and color #81

Open
ijlyttle opened this issue Dec 27, 2019 · 0 comments
Open

Translations of values for fill and color #81

ijlyttle opened this issue Dec 27, 2019 · 0 comments

Comments

@ijlyttle
Copy link
Contributor

ijlyttle commented Dec 27, 2019

This concerns when we specify a value, as opposed to a field (variable) to map colors:

  • ggplot2 accepts R colors: colors()
  • Vega-Lite accepts a css color

Fortunately hex colors, e.g. "#663399" are valid in both systems. The named colors also seem to be very similar - they both seem to derive from X11 colors.

Proposal for the TypeScript side of things:

  • if the value begins with a # and has six characters following, let it through as-is.
  • if the value does not begin with a #, remove any trailing numbers from the color.
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