customize-create-theme is an interactive autoloaded Lisp function in `cus-theme.el'.

(customize-create-theme &optional THEME BUFFER)

Create or edit a custom theme.
THEME, if non-nil, should be an existing theme to edit. If THEME
is `user', the resulting *Custom Theme* buffer also contains a
checkbox for removing the theme settings specified in the buffer
from the Custom save file.
BUFFER, if non-nil, should be a buffer to use; the default is
named *Custom Theme*.