This issue is part of the effort of combining color schemes in the Nav unification project.
For the approved direction please see https://github.com/Automattic/wp-calypso/issues/45675#issuecomment-714664414.
@sfougnier @lcollette We have a design request for this one:
We'll need to add thumbnails for the color schemes we're porting over from wp-admin similar to the ones that already exist in the Calypso Color Scheme picker. Could you please provide us with these? Thank you!
For reference see SVGs for existing color schemes here:
https://github.com/Automattic/wp-calypso/tree/master/client/assets/images/color-schemes
We may be able to do this ourselves by editing the existing svgs and changing the color codes in them.
Most wp-admin colors seem to be auto generated from 4 main variables:
$base-color: #523f6d;
$icon-color: #ece6f6;
$highlight-color: #a3b745;
$notification-color: #d46f15;
That's from wp-admin/css/colors/ectoplasm/colors.scss
, which is used to build other .css files in that directory, I'm guessing. Not sure how to kick off the build process.
Build steps
wp-admin/css/colors/ectoplasm/colors.scss
Defines top level variables - something like 4 hex codes defines the entire color scheme$menu-submenu-background
are defined in wp-admin/css/colors/_variables.scss
, from applying functions on the top level variableswp-admin/css/colors/admin.scss
is the template used to generate the final css fileswp-admin/css/colors/ectoplasm/*
are the final css filespackages/calypso-color-schemes/src/__color-studio/color-properties.css
packages/calypso-color-schemes/src/__color-studio/color-properties-rgb.css
, but these files aren't tracked in git.@automattic/color-studio
: linkSo we may not be able to match the wp-admin colors 1:1, but rather use approximate matches that come from our internal color pallette. (Although, maybe the wp-admin colors were chosen from the pallette as well, haven't checked)
I created a PR for adding ectoplasm here. This could serve as a basis for making other color schemes: https://github.com/Automattic/wp-calypso/pull/47075
This was a decent amount of work so, maybe one PR per color scheme is the way to go? Any thoughts here?
We may be able to do this ourselves by editing the existing svgs and changing the color codes in them.
Yes, we can easily change them. I was more thinking for design to provide us with guidance on how the thumbnails should look. That said, it's probably pretty easy for us to deduce the right look given that they simply reflect the implemented color scheme.
So we may not be able to match the wp-admin colors 1:1, but rather use approximate matches that come from our internal color pallette. (Although, maybe the wp-admin colors were chosen from the pallette as well, haven't checked)
I'd argue it's imperative that we do match the wp-admin colors 1:1 (either by matching in Calyso or adjusting in wp-admin). The goal of nav unification is to make the two interfaces identical. If colors don't match up exactly, colors will change when switching between menu items.
I'd argue it's imperative that we do match the wp-admin colors 1:1 (either by matching in Calyso or adjusting in wp-admin). The goal of nav unification is to make the two interfaces identical. If colors don't match up exactly, colors will change when switching between menu items.
We do plan to remove the color scheme setting from wp-admin and have it read from calypso, so after all steps are completed, it would match wp-admin 1:1. The issue is that calypso (and other products) have standardized on a standard color pallette, https://color-studio.blog/ or npm package @automattic/color-studio
, and the current wp-admin themes don't fit within that pallette.
Continued discussion here: https://github.com/Automattic/wp-calypso/issues/47103
add/color-scheme-ectoplasm-alt
add/color-scheme-sunrise
add/wp-color-scheme-ocean
add/color-scheme-coffee
add/color-scheme-blue
add/color-scheme-modern
add/color-scheme-light
Other PRs I created along the way:
Default - None yet, unsure if we need to port this one
I don't think we need to, right? Thinking out loud here: Initially, if we launch all of color schemes early, the default color scheme on the wp-admin side would be replaced by Classic Bright i.e. current Calypso colors. Then once we launch nav unification the default will be replaced by the new dark colors. With than in mind it seems like we wouldn't need to port the wp-admin default color scheme over to Calypso (but we'd definitely need to port over default Calypso Classic Bright to wp-admin). If folks want the old colours back, they can select the new Classic Dark theme we're creating that's very close to the wp-admin color scheme.
Closing as last remaining task is logged as a new issue here https://github.com/Automattic/wp-calypso/issues/47597
Most helpful comment
Link to PRs dealing with individual schemes
add/color-scheme-ectoplasm-alt
add/color-scheme-sunrise
add/wp-color-scheme-ocean
Awaiting Calypso midnight to be renamed, Not porting. Updating Calypso to match wp-adminadd/color-scheme-coffee
add/color-scheme-blue
add/color-scheme-modern
add/color-scheme-light
Other PRs I created along the way: