Customizing ComfyUI Appearance
Learn how to customize the appearance of ComfyUI using color palettes and advanced CSS options
ComfyUI offers flexible appearance customization options that allow you to personalize the interface to your preferences.
Color Palette System
The primary way to customize ComfyUI’s appearance is through the built-in color palette system.
This allows you to:
- Switch ComfyUI themes
- Export the currently selected theme as JSON format
- Load custom theme configuration from JSON file
- Delete custom theme configuration
For appearance needs that cannot be satisfied by the color palette, you can perform advanced appearance customization through the user.css file
How to Customize Color Themes
The color palette allows you to modify many specific properties. Here are some of the most commonly customized elements, with colors represented in hexadecimal format:
- The JSON comments below are for illustration only. Do not copy the content below for modification as it will cause the theme to malfunction.
- Since we are still iterating frequently, the content below may change with ComfyUI frontend updates. If you need to modify, please export the theme configuration from settings and then modify it.
Canvas
Background Image
- Requirements: ComfyUI frontend version 1.20.5 or newer
- Function: Set a custom background image for the canvas to provide a more personalized workspace. You can upload images or use web images to set the background for the canvas.
Node
Node Opacity
- Function: Set the opacity of nodes, where 0 represents completely transparent and 1 represents completely opaque.
Node Widget
Textarea Widget Font Size
- Range: 8 - 24
- Function: Set the font size in textarea widgets. Adjusts the text display size in text input boxes to improve readability.
Sidebar
Unified Sidebar Width
- Function: When enabled, the sidebar width will be unified to a consistent width when switching between different sidebars. If disabled, different sidebars can maintain their custom widths when switching.
Sidebar Size
- Function: Control the size of the sidebar, can be set to normal or small.
Sidebar Location
- Function: Control whether the sidebar is displayed on the left or right side of the interface, allowing users to adjust the sidebar position according to their usage habits.
Tree Explorer
Tree Explorer Item Padding
- Function: Set the padding of items in the tree explorer (sidebar panel), adjusting the spacing between items in the tree structure.
Advanced Customization with user.css
For cases where the color palette doesn’t provide enough control, you can use custom CSS via a user.css file. This method is recommended for advanced users who need to customize elements that aren’t available in the color palette system.
Requirements
- ComfyUI frontend version 1.20.5 or newer
Setting Up user.css
- Create a file named
user.css
in your ComfyUI user directory (same location as your workflows and settings - see location details below) - Add your custom CSS rules to this file
- Restart ComfyUI or refresh the page to apply changes
User Directory Location
The ComfyUI user directory is where your personal settings, workflows, and customizations are stored. The location depends on your installation type:
The user directory is located in your ComfyUI installation folder:
For example, if you cloned ComfyUI to C:\ComfyUI
, your user directory would be C:\ComfyUI\user\default
(or C:\ComfyUI\user\john
if you’ve set up a custom username).
ComfyUI supports multiple users per installation. If you haven’t configured a custom username, it defaults to “default”. Each user gets their own subdirectory within the user
folder.
The user directory is located in your ComfyUI portable folder:
For example: ComfyUI_windows_portable/ComfyUI/user/default
ComfyUI supports multiple users per installation. If you haven’t configured a custom username, it defaults to “default”. Each user gets their own subdirectory within the user
folder.
This location contains your workflows, settings, and other user-specific files.
After finding the above folder location, please copy the corresponding CSS file to the corresponding user directory, such as the default user folder being ComfyUI/user/default
, then restart ComfyUI or refresh the page to apply changes.
user.css Examples and Related Instructions
The user.css
file is loaded early in the application startup process. So you may need to use !important
in your CSS rules to ensure they override the default styles.
user.css Customization Examples
Best Practices
- Start with the color palette for most customizations
- Use user.css only when necessary for elements not covered by the color palette
- Export your theme before making significant changes so you can revert if needed
- Share your themes with the community to inspire others
Troubleshooting
- If your color palette changes don’t appear, try refreshing the page
- If CSS customizations don’t work, check that you’re using frontend version 1.20.5+
- Try adding
!important
to user.css rules that aren’t being applied - Keep backups of your customizations to easily restore them