I'm trying to define a color set (from material color) in order to be able to easily change the set I want to use. I think I've managed to define them but then, I'm not able to use them properly. I guess the last line below is problematic (I got a wrong argument when evaluating it) but I'm not familiar enough with lisp to fix it.
;; Material colors from https://material.io/design/color/
(defconst deep-purple '((level-100 "#D1C4E9")
(level-200 "#B39DDB")
(level-300 "#9575CD")
(level-400 "#7E57C2")
(level-500 "#673AB7")
(level-600 "#5E35B1")
(level-700 "#512DA8")
(level-800 "#4527A0")
(level-900 "#311B92")
(level-A100 "#B388FF")
(level-A200 "#7C4DFF")
(level-A400 "#651FFF")
(level-A700 "#6200EA")))
;; Get a material color
(defun color (hue level)
"Return the color from the given shade-list and specified shade."
(cdr (assoc level hue)))
;; Define default hue
(defconst default-hue deep-purple)
;; Get some color
(defconst background-color (color default-hue 'level-700))
;; Problematic line
(set-face-attribute 'mode-line nil
:weight 'regular
:background background-color
:box `(:line-width 1 :color background-color :style nil))