With emacsformcosx Emacs version 26.1 (9.0) on Mojave:
$ /Applications/Emacs.app/Contents/MacOS/Emacs --debug-init 2018-12-22 10:09:38.421 Emacs-x86_64-10_10[6625:159678] Failed to initialize color list unarchiver: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: non-keyed archive cannot be decoded by NSKeyedUnarchiver}
I would suggest filtering out colors without rgb values in defined-colors:
(defun defined-colors (&optional frame) "Return a list of colors supported for a particular frame. The argument FRAME specifies which frame to try. The value may be different for frames on different display types. If FRAME doesn't support colors, the value is nil. If FRAME is nil, that stands for the selected frame." (remove* nil (if (memq (framep (or frame (selected-frame))) '(x w32 ns)) (xw-defined-colors frame) (mapcar 'car (tty-color-alist frame))) :key (function color-values)))
In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31 built on builder10-10.porkrind.org Windowing system distributor 'Apple', version 10.3.1671 Recent messages: .EMACS: pjb-lisp-meat on "emacs-color-bug.txt" done Mark set Saving file /Users/pjb/emacs-color-bug.txt... Wrote /Users/pjb/emacs-color-bug.txt [2 times] save-buffer "/Users/pjb/emacs-color-bug.txt" Mark set [2 times] Saved text until " :key (function color-values))) " Text is read-only Making completion list...
Important settings: value of $LC_CTYPE: UTF-8 value of $LANG: en_FR.UTF-8 locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect: global-flycheck-mode: t flycheck-mode: t erc-truncate-mode: t erc-track-mode: t erc-services-mode: t erc-networks-mode: t erc-ring-mode: t erc-replace-mode: t erc-netsplit-mode: t erc-match-mode: t erc-pcomplete-mode: t erc-autojoin-mode: t erc-autoaway-mode: t show-paren-mode: t auto-image-file-mode: t erc-button-mode: t erc-stamp-mode: t global-auto-complete-mode: t auto-complete-mode: t erc-log-mode: t erc-irccontrols-mode: t erc-readonly-mode: t paredit-mode: t diff-auto-refine-mode: t display-time-mode: t shell-dirtrack-mode: t cl-old-struct-compat-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t unify-8859-on-decoding-mode: t unify-8859-on-encoding-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t