From 0d5244e4d1b0d89e1157f4d48d98c1913bbba757 Mon Sep 17 00:00:00 2001 From: "stefanorigano (SRI)" Date: Tue, 28 Sep 2021 14:02:18 +0000 Subject: [PATCH] [IMP] website: improve default palettes Prior to this commit default palettes were picked from the general library in an attempt to provide as much variety as possible. Unfortunately they didn't cover the entire primary colors spectrum and some were "challenging" to customize (eg. mild-tone colors barely readable in certain circumstances). This commit defines new safest palettes that cover a wider range of primary colors (ref. ~2 palettes for each column in this page https://getbootstrap.com/docs/5.0/customize/color/#all-colors). task-2656337 X-original-commit: 405e5470d2f950877d22420462c2e14922f77c35 Part-of: odoo/odoo#77857 --- .../components/configurator/configurator.js | 40 ++++----- .../static/src/scss/primary_variables.scss | 82 ++++++++++++++----- 2 files changed, 82 insertions(+), 40 deletions(-) diff --git a/addons/website/static/src/components/configurator/configurator.js b/addons/website/static/src/components/configurator/configurator.js index 4e1f1a76d5f..cfd2fb6ed66 100644 --- a/addons/website/static/src/components/configurator/configurator.js +++ b/addons/website/static/src/components/configurator/configurator.js @@ -31,26 +31,26 @@ const WEBSITE_PURPOSES = { }; const PALETTE_NAMES = [ - 'avantgarde-2', - 'bistro-6', - 'bookstore-4', - 'generic-4', - 'bookstore-5', - 'beauty-3', - 'cobalt-1', - 'odoo-experts-2', - 'artists-4', - 'bewise-1', - 'generic-16', - 'generic-12', - 'clean-2', - 'generic-8', - 'vehicle-1', - 'anelusia-4', - 'nano-2', - 'notes-3', - 'graphene-2', - 'enark-4', + 'default-1', + 'default-2', + 'default-3', + 'default-4', + 'default-5', + 'default-6', + 'default-7', + 'default-8', + 'default-9', + 'default-10', + 'default-11', + 'default-12', + 'default-13', + 'default-14', + 'default-15', + 'default-16', + 'default-17', + 'default-18', + 'default-19', + 'default-20', ]; // Attributes for which background color should be retrieved diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index 51f05b2a468..d4a2ca8d81d 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -54,6 +54,48 @@ $o-color-palettes: map-merge($o-color-palettes, 'footer': 2, 'copyright': 5, )), + 'default-1': o-make-palette(#38383B, null, ( + 'menu': 4, + 'footer': 4, + 'copyright-custom': 'black-15', + )), + 'default-2': o-make-palette(#0F5132, null, ( + 'menu': 4, + 'footer': 4, + 'copyright-custom': 'black-15', + )), + 'default-3': o-make-palette(#6CB14F, #114B5F, ( + 'menu': 3, + 'footer': 3, + 'copyright-custom': 'black-15', + )), + 'default-4': o-make-palette(#20C997, #426A5A, ( + 'menu': 2, + 'footer': 2, + )), + 'default-5': o-make-palette(#79DFC1, null, ( + 'footer': 1, + )), + 'default-6': o-make-palette(#3DD5F3), + 'default-7': o-make-palette(#6EA8FE, #474973), + 'default-8': o-make-palette(#0AA2C0), + 'default-9': o-make-palette(#0A58CA), + 'default-10': o-make-palette(#6610F2, #C97064), + 'default-11': o-make-palette(#6F42C1, #114B5F), + 'default-12': o-make-palette(#A370F7, #504746), + 'default-13': o-make-palette(#e36ff7, #233D4D), + 'default-14': o-make-palette(#E56B6B, #4C5B5C), + 'default-15': o-make-palette(#8B1E3F, #23395B), + 'default-16': o-make-palette(#DE6528), + 'default-17': o-make-palette(#E17726, #51344D), + 'default-19': o-make-palette(#FAB803, #1A1423, ( + 'menu': 3, + 'footer': 3, + 'copyright-custom': 'black-15', + )), + 'default-18': o-make-palette(#DFA400), + 'default-20': o-make-palette(#B99253, #495867), + 'generic-1': ( 'o-color-1': #984c46, 'o-color-2': #23323b, @@ -1879,26 +1921,26 @@ $o-theme-color-palettes-compatibility-indexes: null; // Default to the color one // Create the list of palettes proposed by the UI $o-selected-color-palettes-names: ( // Proposed by the configurator - 'avantgarde-2', - 'bistro-6', - 'bookstore-4', - 'generic-4', - 'bookstore-5', - 'beauty-3', - 'cobalt-1', - 'odoo-experts-2', - 'artists-4', - 'bewise-1', - 'generic-16', - 'generic-12', - 'clean-2', - 'generic-8', - 'vehicle-1', - 'anelusia-4', - 'nano-2', - 'notes-3', - 'graphene-2', - 'enark-4', + 'default-1', + 'default-2', + 'default-3', + 'default-4', + 'default-5', + 'default-6', + 'default-7', + 'default-8', + 'default-9', + 'default-10', + 'default-11', + 'default-12', + 'default-13', + 'default-14', + 'default-15', + 'default-16', + 'default-17', + 'default-18', + 'default-19', + 'default-20', // System default 'base-1',