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

Add RGB Hexadecimal text input to colour picker #170

Merged
merged 5 commits into from
Jun 28, 2023

Conversation

miccou
Copy link
Contributor

@miccou miccou commented Jun 14, 2023

image

  • Adds a text input above the colour picker.
  • If you drag the mouse to pick a colour, the hex code updates.
  • Hex code inputs is restricted to base16 chars.
  • Pressing enter after typing or pasting a hex colour code chooses the same colour by hue and sat but with 100% luminance.
  • Pressing enter without a valid 3 or 6 character hex colour code will do nothing
  • Clicking out of the colour picker will reset the text box to match the selected colour

@miccou
Copy link
Contributor Author

miccou commented Jun 21, 2023

@olivia would yourself or another maintainer have time to consider this PR?

Copy link
Contributor

@olivia olivia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the contribution ❤️ I have some code changes requested and could you also update the positioning of the tooltip tail (the triangle)? Right now it doesn't point at the control in the screenshot you posted.

src/components/inputs/color-picker.tsx Outdated Show resolved Hide resolved
@miccou
Copy link
Contributor Author

miccou commented Jun 27, 2023

Thanks for your feedback @olivia, I've addressed these with commits to my feature branch.
image

@miccou miccou requested a review from olivia June 27, 2023 10:42
Copy link
Contributor

@olivia olivia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for making the requested edits!

@olivia olivia merged commit dc120cb into the-via:main Jun 28, 2023
1 check failed
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

Successfully merging this pull request may close these issues.

2 participants