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

Unknown color when parsing 3 character hex string #51

Open
DRFR0ST opened this issue Oct 29, 2021 · 0 comments
Open

Unknown color when parsing 3 character hex string #51

DRFR0ST opened this issue Oct 29, 2021 · 0 comments

Comments

@DRFR0ST
Copy link

DRFR0ST commented Oct 29, 2021

Hi there! I've arrived here to report an issue with colors passed to the RNTooltips component.

Context

I've tried to apply a hex color to tintColor and textColor. It worked very well for regular 6 character hex color like: #000000 and #FFFFFF. But in my case, I wanted to pass it the colors generated from my theme and one of them (provided to tintColor) was a 3 character hex color: #fff which then threw an error saying Unknown color.

Process

  1. Do the setup described in docs.
  2. Pass tintColor a 3 character hex string (eg. #fff).
  3. It should throw error on mount.

Expected result

It should parse the 3 character hex string same as the 6 character hex.

Current result

Not being able to pass a 3 character hex string.

Possible Fix

Maybe this article will be helpful.


I might not find time to make a pull request but I would be happy to help, if you need any.

PS. Since I'm already here, a feature request: Please make the package TypeScript compatible, it was a thing that annoyed me a little. 😃

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