WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/background color

Contents

Description

Display background color for the current active theme.

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

Usage

<?php background_color(); ?>

Parameters

None.

Return Values

(void) 
This function does not return a value.

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.