Split off of #3217923: [Plan] Organize and refactor CSS color variables for Olivero
In the not-so-distant (Drupal 10) future, we want Olivero to be able to support changing design by changing base CSS variables. In order make this process easier, it makes sense to re-architect the CSS variables sooner than later.
- Convert all of the hex values for blues and grays to HSL values.
- Normalize the values for the hues and saturations.
This will require designer sign off, as there will be slightly different shades of blue and gray. We'll also want to triple check that the new colors still meet WCAG accessibility contrast guidelines.
Original Gray Hex to HSL conversion
Note that the hues and saturations will be normalized.
--color--gray-0: #0d1214; - Black 1 - hsl(197, 21%, 6%)
--color--gray-10: #313637; - Black 2 - hsl(190, 6%, 20%)
--color--gray-20: #6e7172; - Black 3 - hsl(195, 2%, 44%)
--color--gray-25: #5d7585; - Gray Dark - hsl(204, 18%, 44%)
--color--gray-28: #7d919d; - Gray Dark 2 - hsl(203, 14%, 55%)
--color--gray-30: #7e96a7; - Gray medium - hsl(205, 19%, 57%)
--color--gray-40: #98abb9; - Gray medium 1 - hsl(205, 19%, 66%)
--color--gray-45: #afb8be; - Gray medium 2 - hsl(204, 10%, 72%)
--color--gray-50: #9ea0a1; - Black 4 - hsl(200, 2%, 63%)
--color--gray-70: #d7e1e8; - Gray light - hsl(205, 27%, 88%)
--color--gray-80: #e7edf1; - Gray light 1 - hsl(204, 26%, 93%)
--color--gray-90: #f1f4f7 - hsl(210, 27%, 96%)
--color--gray-95: #f7f9fa; - Gray light 2 - hsl(200, 23%, 97%)
Original Blue Hex to HSL conversion
Note that the hues and saturations will be normalized.
--color--blue-20: #0d77b5; - Blue dark - hsl(202, 87%, 38%)
--color--blue-30: #3d92c4; - Blue dark 2 - hsl(202, 53%, 50%)
--color--blue-50: #2494db; - Blue medium - hsl(203, 72%, 50%)
--color--blue-70: #53b0eb; - Blue bright - hsl(203, 79%, 62%)
--color--blue-90: #ddeffb; - Blue bright 5 - hsl(204, 79%, 93%)
Related issues:
Comments
Comment #2
mherchelComment #3
mherchelPatch attached. Note that I removed blue 30 because its not being used.
Tugboat preview for this: https://hsl-colors-9bqruzkyptqepeiakdiqgtfy1eqbxffl.tugboat.qa/
Comment #4
mherchelComment #5
mherchelThis new patch also consolidates a one-off hex color within the site branding block
Comment #6
vikashsoni commented@mherchel thanks for the patch
Applying successfully for me
Thanks
Comment #7
mherchel@vikashsoni Thanks for testing this out. However, the Drupal tests will fail if the patch fails to apply, so there is no need to post screenshots or indicate that the patch doesn't apply.
Comment #8
jwitkowski79 commented@mherchel, the colors look good!
Comment #9
marcusvsouza commented@mherchel, very nice change, the colors looks pretty good!
Comment #10
sakthivel m commented@mherchel, patch look good!
+ RTBC
Comment #11
chetanbharambe commentedComment #12
chetanbharambe commentedVerified and tested patch #5.
Patch applied successfully and looks good to me.
Expected Results:
# Convert all colors (blues and grays) to HSL and normalize hues and saturations
Looks good to me.
Please find attached screenshots.
Can be a move to RTBC.
Comment #13
mherchelRe-rolling (and converting some additional colors that were added in subsequent commits)
Updated Tugboat link at https://hsl-colors-cuhfrcke26xxrg9bu8nz61pgdbfenl24.tugboat.qa/
Comment #14
mherchelComment #15
mherchelTests failed because I forgot to rebuild the patch after updating
header-site-branding.pcss.cssComment #16
mherchelTugboat preview for the previous patch is at https://hsl-colors-3-zhkb4qdwe1riy3kpccg4u2llsijcqfe6.tugboat.qa/
Also attaching a movie where I flip back and forth between tabs with the current colors vs the new colors.
Comment #17
mherchelForgot to update the LTR version of
.site-brandingwithin header-site-branding.pcss.cssUpdated Tugboat link with the latest code.
Comment #18
andy-blumMarking RTBC, but making a few follow-up notes here:
Comment #19
mherchelNote that #2 above is #3217926: Olivero: Rename and consolidate all color CSS variable names.
Comment #20
mherchelRe-roll attached.
Comment #22
mherchelUnrelated test failure.
Comment #23
mherchelComment #24
kostyashupenkoReroll
Comment #26
mherchelConverting a newly added color to HSL in this patch (added in #3211616: Olivero: a11y color contrast test fail for primary button on hover).
Comment #27
mherchelRe-roll of #26. The source files have not changed.
Tugboat preview for this: https://3217924-hsl-colors-27-spajhejk5nn59ladis7yz3aqu4yygo9u.tugboat.qa/
Comment #29
mherchelMoving this to Drupal 10, since that's where we're going to make use of the HSL colors.
Comment #30
andy-blumD10 Tugboat: https://3217924-29-a2feq1gkh48vdhiceryrvpvzkz2gs2ma.tugboat.qa/
This looks good to me!
Comment #31
mherchelRe-roll of #29 attached.
Comment #32
mherchelAdjusting credits
Comment #33
mherchelAdjusting credits
Comment #35
lauriiiCommitted 0d46b74 and pushed to 10.0.x. Thanks!