Title: wp_admin_css_color
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_admin_css_color( string $key, string $name, string $url, array $colors = array(), array $icons = array() )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#wp--skip-link--target)

Registers an admin color scheme css file.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#description)󠁿

Allows a plugin to register a new admin color scheme. For example:

    ```php
    wp_admin_css_color( 'classic', __( 'Classic' ), admin_url( "css/colors-classic.css" ), array(
        '#07273E', '#14568A', '#D54E21', '#2683AE'
    ) );
    ```

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#parameters)󠁿

 `$key`stringrequired

The unique key for this theme.

`$name`stringrequired

The name of the theme.

`$url`stringrequired

The URL of the CSS file containing the color scheme.

`$colors`arrayoptional

An array of CSS color definition strings which are used to give the user a feel 
for the theme.

Default:`array()`

`$icons`arrayoptional

CSS color definitions used to color any SVG icons.

 * `base` string
 * SVG icon base color.
 * `focus` string
 * SVG icon color on focus.
 * `current` string
 * SVG icon color of current admin menu link.

Default:`array()`

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#source)󠁿

    ```php
    function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = array() ) {
    	global $_wp_admin_css_colors;

    	if ( ! isset( $_wp_admin_css_colors ) ) {
    		$_wp_admin_css_colors = array();
    	}

    	$_wp_admin_css_colors[ $key ] = (object) array(
    		'name'        => $name,
    		'url'         => $url,
    		'colors'      => $colors,
    		'icon_colors' => $icons,
    	);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/general-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/general-template.php#L4850)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/general-template.php#L4850-L4863)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#related)󠁿

| Used by | Description | 
| [register_admin_color_schemes()](https://developer.wordpress.org/reference/functions/register_admin_color_schemes/)`wp-includes/general-template.php` |

Registers the default admin color schemes.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.5.0](https://developer.wordpress.org/reference/since/2.5.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/wp_admin_css_color/?output_format=md#comment-content-1392)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  10 years ago  ](https://developer.wordpress.org/reference/functions/wp_admin_css_color/#comment-1392)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_admin_css_color%2F%23comment-1392)
    Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_admin_css_color%2F%23comment-1392)
 4. **Example**
 5. To register the Classic admin theme using default blue scheme use:
 6.     ```php
        wp_admin_css_color(
        	'classic',
        	__( 'Classic', 'textdomain' ),
        	admin_url( "css/colors/blue/colors.css" ),
        	array('#07273E', '#14568A', '#D54E21', '#2683AE'),
        	array( 'base' => '#e5f8ff', 'focus' => '#fff', 'current' => '#fff' )
        );
        ```
    
 7.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_admin_css_color%2F%3Freplytocom%3D1392%23feedback-editor-1392)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_admin_css_color%2F)
before being able to contribute a note or feedback.