How to Change Colors in the Twenty Twenty Theme Using Custom CSS
Content
Customizing the color scheme is one of the most common ways to personalize a WordPress site. The Twenty Twenty theme provides built-in color options, but many users find they need more precise control. This guide covers the most frequent color-related challenges and how to solve them with custom CSS.
Common Color Customization Scenarios
Based on community discussions, users most often want to change:
- Link and accent colors
- Header, footer, and navigation menu colors
- Text colors for specific elements like post titles or category links
- Background colors for specific page sections
- Active page indicators in navigation menus
Why Custom CSS is Often Needed
While Twenty Twenty offers some color customization through the Appearance → Customize → Colors panel, it has limitations:
- You cannot specify exact hexadecimal color values
- Some elements don't respond to the global color settings
- The theme's automatic color calculations may not always produce desired results
- Mobile and desktop versions sometimes display colors differently
Most Effective Solution: Additional CSS
The most reliable method for precise color control is using the Additional CSS feature in the WordPress Customizer (Appearance → Customize → Additional CSS). This approach:
- Doesn't require modifying theme files directly
- Preserves your changes through theme updates
- Provides exact control over specific elements
Frequently Used CSS Code Snippets
Here are the most commonly requested color changes and their CSS solutions:
1. Change All Accent Colors
.color-accent, .color-accent-hover:hover, .color-accent-hover:focus,
:root .has-accent-color, .has-drop-cap:not(:focus):first-letter,
a, blockquote, .border-color-accent, .border-color-accent-hover:hover,
.border-color-accent-hover:focus, button:not(.toggle), .button,
.faux-button, .wp-block-button__link, .wp-block-file .wp-block-file__button,
input[type="button"], input[type="reset"], input[type="submit"],
.bg-accent, .bg-accent-hover:hover, .bg-accent-hover:focus {
color: your-color-value !important;
}
2. Change Active Navigation Menu Item Color
nav.primary-menu-wrapper ul.primary-menu li.current-menu-item a {
color: your-color-value !important;
}
3. Change Footer Background Color Only
#site-footer {
background-color: your-color-value !important;
}
4. Change Post Title Color
.entry-title a {
color: your-color-value !important;
}
5. Change Category Link Color and Remove Link
.singular:not(.overlay-header) .entry-header .entry-categories a {
color: your-color-value !important;
pointer-events: none;
cursor: default;
text-decoration: none;
}
Important Considerations
When using these CSS snippets:
- Replace "your-color-value" with your preferred color (hex, RGB, or named color)
- The !important declaration is often necessary to override theme defaults
- Test changes across different devices and screen sizes
- Clear any caching plugins after making changes
- Consider using a child theme for more extensive modifications
These solutions address the majority of color customization needs in the Twenty Twenty theme. For more specific requirements, inspecting elements with browser developer tools can help identify the correct CSS selectors to target.
Related Support Threads Support
-
Privacy Policy Link – Text Colourhttps://wordpress.org/support/topic/privacy-policy-link-text-colour/
-
can i use for this web page blacksi.ru?https://wordpress.org/support/topic/can-i-use-for-this-web-page-blacksi-ru/
-
Mobile Headers and Paragraphs not inheriting desktop colorhttps://wordpress.org/support/topic/mobile-headers-and-paragraphs-not-inheriting-desktop-color/
-
Color customizerhttps://wordpress.org/support/topic/color-customizer/
-
Change color of categories and footer linkshttps://wordpress.org/support/topic/change-color-of-categories-and-footer-links/
-
NEW (not child) theme based on 2020 – conflicts??https://wordpress.org/support/topic/new-not-child-theme-based-on-2020-conflicts/
-
Customising the reply buttonshttps://wordpress.org/support/topic/customising-the-reply-buttons/
-
Change only footer background color using css?https://wordpress.org/support/topic/change-only-footer-background-color-using-css/
-
Background becomes white upon clicking search headerhttps://wordpress.org/support/topic/background-becomes-white-upon-clicking-search-header/
-
AMP background colorhttps://wordpress.org/support/topic/amp-background-color/
-
Set different colors for the header and Footer sectionhttps://wordpress.org/support/topic/set-different-colors-for-the-header-and-footer-section/
-
Primary color don’t change in homepagehttps://wordpress.org/support/topic/primary-color-dont-change-in-homepage/
-
Error in color computationhttps://wordpress.org/support/topic/error-in-color-computation/
-
Text and background/ highlight color not able to changehttps://wordpress.org/support/topic/text-and-background-highlight-color-not-able-to-change/
-
Stealing a Websites Changing Accent Color Effecthttps://wordpress.org/support/topic/stealing-a-websites-changing-accent-color-effect/
-
Subpages: Change background color in third level of a subpage or morehttps://wordpress.org/support/topic/subpages-change-background-color-in-third-level-of-a-subpage-or-more/
-
Change default color of linkhttps://wordpress.org/support/topic/change-default-color-of-link/
-
Recent Posts- Font Color CSShttps://wordpress.org/support/topic/recent-posts-font-color-css/
-
Changing Primary color with CSShttps://wordpress.org/support/topic/changing-primary-color-with-css/
-
Changed color BUT still no changes on Homepagehttps://wordpress.org/support/topic/changed-color-but-still-no-changes-on-homepage/
-
Active page color in nav barhttps://wordpress.org/support/topic/active-page-color-in-nav-bar/
-
Changing text colourhttps://wordpress.org/support/topic/changing-text-colour-6/
-
#000 black headershttps://wordpress.org/support/topic/000-black-headers/
-
Change Post Category Color and remove linkhttps://wordpress.org/support/topic/change-post-category-color-and-remove-link/
-
Change color overlay of featured images on hover?https://wordpress.org/support/topic/change-color-overlay-of-featured-images-on-hover/
-
Colour problemhttps://wordpress.org/support/topic/colour-problem/
-
Can’t change color of selected texthttps://wordpress.org/support/topic/cant-change-color-of-selected-text/
-
Changing Default Post Color in 2020https://wordpress.org/support/topic/changing-default-post-color-in-2020/
-
Background color on AMPhttps://wordpress.org/support/topic/background-color-on-amp/
-
Custom color hex code for Primary Colorhttps://wordpress.org/support/topic/custom-color-hex-code-for-primary-color/
-
Border around site or main contenthttps://wordpress.org/support/topic/border-around-site-or-main-content/
-
Change colour background blog pagehttps://wordpress.org/support/topic/change-colour-background-blog-page/
-
Change text color in categories posthttps://wordpress.org/support/topic/change-text-color-in-categories-post/
-
Colors and all thathttps://wordpress.org/support/topic/colors-and-all-that/
-
Change the colorhttps://wordpress.org/support/topic/change-the-color-9/
-
How do I change the Accent Color in mobile/tablet version (Twenty Twenty Theme)https://wordpress.org/support/topic/how-do-i-change-the-accent-color-in-mobile-tablet-version-twenty-twenty-theme/
-
Twentytwentyhttps://wordpress.org/support/topic/twentytwenty/