Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/background color

This page redirects to an external site: https://developer.wordpress.org/reference/functions/background_color/

Description

Display background color for the current active theme, if the active theme supports the customize background color ability in the Appearance Customize Screen.

This is a hexadecimal value for the color without the leading hash sign (#).

Usage

<?php background_color(); ?>

Parameters

None.

Return Values

None.

Examples

Display a div with the theme's background color:

<div id="background" style="background-color: #<?php background_color(); ?>">
Content here.
</div>

Notes

Change Log

Since: 3.0.0

Source File

background_color() is located in wp-includes/theme.php.

Related

get_background_color(), background_image(), get_background_image()

This page is marked as incomplete. You can help Codex by expanding it.
See also index of Function Reference and index of Template Tags.