 
       (defun spacemacs/defface-state-color (state color)
         "Define a face for the given STATE and background COLOR."
-        (eval `(defface ,(spacemacs/state-color-face state)
-                 '((t (:background ,color :inherit mode-line)))
+        (eval `(defface ,(spacemacs/state-color-face state) '((t ()))
                  ,(format "%s state face." (symbol-name state))
-                 :group 'spacemacs)))
+                 :group 'spacemacs))
+        (set-face-attribute (spacemacs/state-color-face state) nil
+                            :background color
+                            :foreground (face-background 'mode-line)
+                            :box (face-attribute 'mode-line :box)
+                            :inherit 'mode-line))
 
       (defun spacemacs/state-color (state)
         "Return the color string associated to STATE."

        (if (eq (frame-selected-window) (selected-window))
            (if (fboundp 'flycheck-has-current-errors-p)
                (cond ((flycheck-has-current-errors-p 'error)
                       'spacemacs-mode-line-color-error)
                      ((flycheck-has-current-errors-p 'warning)
                       'spacemacs-mode-line-color-warning)
                      ((flycheck-has-current-errors-p 'info)
                       'spacemacs-mode-line-color-info)
                      (t nil))
              nil)
          nil))

          (window-numbering-mode 1)))
      (evil-leader/set-key "tm" 'powerline-minor-modes-toggle)

      (defun spacemacs/window-number ()
        "Return the number of the window."
        (let ((num (window-numbering-get-number-string)))
          (cond ((not (display-graphic-p)) (concat "(" num ")"))
                ((equal num "1")  " ➊ ")
