Skip to content

[3.0] Theme split (wave 3, part 1) — Add the primary and secondary colour ramps - #9369

Open
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-color-ramps
Open

[3.0] Theme split (wave 3, part 1) — Add the primary and secondary colour ramps#9369
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/theme-color-ramps

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Part 1 of wave 3 of the #7933 split. Adds the two colour ramps the rest of the theme is built on.

The theme branch does not pick its colours one at a time. It derives them from two nine-step ramps, each generated from a single hue, so that a forum can be re-tinted by changing one number. release-3.0 has no equivalent, because wave 2 deliberately kept every token at the literal value the rule already used.

--primary-color-hex:   #38546B;
--primary-color-hue:   207;
--primary-color-500:   hsl(var(--primary-color-hue), 27%, 45%);
--primary-color-700:   var(--primary-color-hex);
--primary-color-800:   hsl(var(--primary-color-hue), 34%, 25%);

The ramps are internally consistent, which is worth checking rather than assuming:

  • #38546B is hsl(207, 31%, 32%), so hue 207 is right, and step 700 sits correctly between step 600 at 39% lightness and step 800 at 25%.
  • #ff9400 is hsl(35, 100%, 50%), so hue 35 is right, and step 500 sits between step 400 at 57% and step 600 at 49%.

What this does not do

Nothing references the ramps, and no existing token is repointed at one. --html-bg is still #3e5a78 rather than var(--primary-color-900), and the same goes for every other token already in the file. Nothing rendered changes.

Repointing the existing tokens at the ramp is a real visual change and deserves its own review, so it is not in here. This only puts the ramp in place so that the chrome parts that follow can express the tokens they add in terms of it instead of adding more hard-coded colours.

Issues References (Fixes|Related|Closes)

Related to #7933.

The remaining theme parts are built on two nine-step ramps derived from a
single hue each, rather than on individually chosen colours. Adding them
ahead of those parts keeps each of them to the tokens it actually
introduces.

Nothing references the ramps yet and no existing token is repointed at
them, so this changes nothing that is rendered.

Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants