-
Notifications
You must be signed in to change notification settings - Fork 683
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 color section to styleguide #2030
Conversation
|
a3a7633
to
b7e0928
Compare
Verification steps and regression pass but need @jcalcaben and @soumya-ashok review to get this merged. |
const getLightness = channels => { | ||
const [r, g, b] = channels.map(getSRGB); | ||
|
||
return r * 0.2126 + g * 0.7152 + b * 0.0722; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop a comment about these numbers?
|
||
return factor <= 0.03928 | ||
? factor / 12.92 | ||
: Math.pow((factor + 0.055) / 1.055, 2.4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop a comment about these numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions around numbers used. Dropping some comments will help.
Thanks, good catch. I've extracted those utils to a new file and put a comment in there citing the original source. The numbers you highlighted are magic numbers from a formula that I obviously didn't create. |
Addressed feedback from @soumya-ashok by putting the colors into sections that reflect their usage, and ordering those sections. |
Description
Add a color section to the styleguide. The prose content may be lorem ipsum, but the values should reflect the official Venia styles.
Related Issue
PWA-224
Acceptance
Verification Stakeholders
Specification
Verification Steps
yarn workspace @magento/venia-styleguide run start
/page/color
Screenshots / Screen Captures (if appropriate)
Checklist