diff --git a/catppuccin-theme.el b/catppuccin-theme.el index 3692c8c..67d1200 100644 --- a/catppuccin-theme.el +++ b/catppuccin-theme.el @@ -239,6 +239,15 @@ FLAVOR defaults to the value of `catppuccin-flavor'." (defalias 'catppuccin-get-color 'catppuccin-color) +(defun catppuccin-insert-color (color &optional flavor) + "Insert COLOR at point." + (interactive "SColor: ") + (let ((color (catppuccin-color color flavor))) + (insert + (if (char-equal (char-before) ?#) + (string-remove-prefix "#" color) + color)))) + ;;; Theme definition: (let