Skip to content

Instantly share code, notes, and snippets.

@JeffMatson
Last active February 11, 2016 19:47
Show Gist options
  • Save JeffMatson/86b44ec68bbc4ce80e6e to your computer and use it in GitHub Desktop.
Save JeffMatson/86b44ec68bbc4ce80e6e to your computer and use it in GitHub Desktop.
Gets the colors in the current WordPress admin color scheme
function build_admin_colors() {
global $_wp_admin_css_colors;
$current_color_scheme = get_user_meta(get_current_user_id(), 'admin_color', true);
$colors = array_merge(
$_wp_admin_css_colors[$current_color_scheme]->colors,
$_wp_admin_css_colors[$current_color_scheme]->icon_colors
);
return $colors;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment