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

Convert colors between different color spaces. #9

Merged
merged 68 commits into from
Jul 12, 2022
Merged

Convert colors between different color spaces. #9

merged 68 commits into from
Jul 12, 2022

Conversation

jgerigmeyer
Copy link
Member

@netlify
Copy link

netlify bot commented Apr 22, 2022

Deploy Preview for oddcontrast ready!

Name Link
🔨 Latest commit 67d55cd
🔍 Latest deploy log https://app.netlify.com/sites/oddcontrast/deploys/62cd0219366dad00082b5d44
😎 Deploy Preview https://deploy-preview-9--oddcontrast.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@mirisuzanne mirisuzanne 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! At this stage, I'm not sure which of my UX notes should get resolved in this branch, vs get a new card in trello. But it's very cool what we have!

@jgerigmeyer
Copy link
Member Author

@jgerigmeyer
Copy link
Member Author

@jgerigmeyer
Copy link
Member Author

@jgerigmeyer
Copy link
Member Author

jgerigmeyer commented Apr 22, 2022

@mirisuzanne Okay, I think I've addressed all of the review comments. We now have:

  • Default starting color in oklch, with bg in view mode and fg in edit mode
  • Ability to toggle between modes, and paste a new color (with error message if pasted value cannot be parsed)
  • Ability to switch color spaces (currently only oklch and hsl), which switches sliders as well
  • List of current colors in other formats, with warning if it's out of gamut and/or not a supported format in the current browser
  • Swatch/header colors use fallback (P3, then sRGB) if the selected format isn't supported by the current browser
  • Swatch/header colors do gamut mapping if the current selection is out of gamut
  • If the current selection is out of gamut, right now the color is not auto-mapped for purposes of further editing or sliders. That means that, for example, if I create a high-chroma oklch color and then switch to HSL, then switch right back, my color is unchanged. But the sliders likely have a value that's out of their min/max, so as soon as I touch an out-of-gamut slider in HSL mode, the color will snap back into gamut. We can play with this.

@stacyk This needs some cleanup and tests/linting, but I think it's ready for styles.

@jgerigmeyer jgerigmeyer requested a review from mirisuzanne April 22, 2022 20:32
* main:
  more ts
  fix ts
  Automated dependency upgrades
Copy link
Member

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

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

looking good so far, I think this is still waiting on styles?

@stacyk
Copy link
Member

stacyk commented May 2, 2022

* main:
  specify yarn version for netlify
  Automated dependency upgrades
* main:
  Automated dependency upgrades
* main:
  ignore layout file from test coverage
  Automated dependency upgrades
@stacyk stacyk requested a review from SondraE July 8, 2022 19:49
@stacyk
Copy link
Member

stacyk commented Jul 8, 2022

@mirisuzanne this is ready for your re-review

@SondraE I don't know if you want to look this over... There are additional stories in Trello that I've added to address some of the things I know we will want to edit in the near future.

Copy link
Contributor

@SondraE SondraE left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

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

looking good! One bug, and one question.

And now I'm heading out for a week. Feel free to merge after those changes - don't wait for me! :)

* main:
  Adjust to breaking svelte-kit changes
  Automated dependency upgrades
Copy link
Member Author

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

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

@stacyk Looks good! I think there are still two review comments from Mia for you to respond to, then this is good to merge?

@stacyk stacyk merged commit 17738bf into main Jul 12, 2022
@stacyk stacyk deleted the oklch branch July 12, 2022 15:32
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.

4 participants