Skip to content
Snippets Groups Projects

Add color customization option to Olivero

Closes #3257274

This MR expands upon the work done in #3086514 and utilizes the farbtastic replacement method suggested by @mherchel in #1651344.

  • The theme-settings file attaches a new Olivero library that inserts a input[type="color"] element and keeps the two inputs synchronized. Screen_Shot_2022-01-07_at_2.53.23_PM
  • The element has the pattern attribute defined to only accept full, 6-character hexadecimal values with a leading hash. This validation method works in the browser with or without javascript. Screen_Shot_2022-01-07_at_2.52.52_PM
  • The olivero theme file adds a new function that converts hex-code values to an array containing the hue, saturation, and lightness (HSL) values, and then inserts those values to override the theme's defaults defined in the CSS file.
  • The --color--blue--XX formulas are updated to multiply the lightness values to lighten or darken the selected color
Edited by Andy Blum

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Andy Blum added 3 commits

    added 3 commits

    • 5e46f997 - revert unrelated changes
    • b8f17e72 - update hexToHsl function comments
    • a3377828 - rename `branding color` to `base primary color`

    Compare with previous version

  • Andy Blum resolved all threads

    resolved all threads

  • Andy Blum added 1 commit

    added 1 commit

    Compare with previous version

  • Andy Blum marked this merge request as ready

    marked this merge request as ready

  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Andy Blum added 2 commits

    added 2 commits

    • b0527a7b - remove unrelated formatting change
    • 9b32f92a - Add color scheme picker

    Compare with previous version

  • Andy Blum
  • Andy Blum
  • Andy Blum
  • Andy Blum
  • Andy Blum added 2 commits

    added 2 commits

    Compare with previous version

  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Mike Herchel
  • Andy Blum resolved all threads

    resolved all threads

  • Andy Blum added 1 commit

    added 1 commit

    Compare with previous version

  • Author Developer
    /var/www/html/core/themes/olivero/js/color-picker.es6.js:11:56 - Unknown word (programatically)
    /var/www/html/core/themes/olivero/js/color-picker.es6.js:48:6 - Unknown word (Unhides)
    
    CSpell: failed
    FILE: /var/www/html/core/themes/olivero/olivero.theme
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
     635 | ERROR | Doc comment short description must end with a full
         |       | stop
     640 | ERROR | Return type "array [$hue, $saturation, $lightness]"
         |       | must not contain spaces
    ----------------------------------------------------------------------
  • Andy Blum added 2 commits

    added 2 commits

    Compare with previous version

  • Andy Blum added 1 commit

    added 1 commit

    • 625444b4 - fixing function documentation

    Compare with previous version

  • closed

  • reopened

  • Andy Blum added 3 commits

    added 3 commits

    Compare with previous version

  • Andy Blum added 1 commit

    added 1 commit

    • eafc3dee - Make maintenance icon fit selected color scheme

    Compare with previous version

  • Andy Blum added 2 commits

    added 2 commits

    • 0e40650b - change overlay to color to gray
    • 369386a1 - round H, S, and L values to whole ints

    Compare with previous version

  • Andy Blum added 1 commit

    added 1 commit

    • 050e9952 - Add olivero color-changer tests

    Compare with previous version

  • Andy Blum added 18 commits

    added 18 commits

    • 050e9952...0d46b744 - 16 commits from branch project:10.0.x
    • b4c6c710 - Merge branch '10.0.x' into 3257274-implement-color-changing
    • 3a858b98 - Merge branch '10.0.x' into 3257274-implement-color-changing

    Compare with previous version

  • Andy Blum added 4 commits

    added 4 commits

    Compare with previous version

  • Andy Blum added 91 commits

    added 91 commits

    Compare with previous version

  • Andy Blum added 1 commit

    added 1 commit

    • abdea896 - move color picker element from PHP to JS to avoid schema issues

    Compare with previous version

  • Andy Blum added 1 commit

    added 1 commit

    • ae7a04e7 - remove `andy` tag from nightwatch test

    Compare with previous version

  • Jess added 130 commits

    added 130 commits

    Compare with previous version

  • Mike Herchel added 48 commits

    added 48 commits

    Compare with previous version

  • Mike Herchel
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading