get admin color for set on plugin page css

Posted: June 5, 2015 in Uncategorized
Tags: , , , , , ,

I have created plugins but problem is when user change admin theme color, my plugin page color not same as theme color, after some search I got some information,each user has an entry called : admin_color in user meta table where current admin theme color is set,here is the code to get current theme color

$get_active_color = get_user_meta(get_current_user_id(), ‘admin_color’, true);
$color_schemes = array(‘sunrise’=>’#CF4944′,’fresh’=>’#333′,’light’=>’#999′,’blue’=>’#4796b3′,’midnight’=>’#363b3f’,’ectoplasm’=>’#523f6d’,’ocean’=>’#738e96′,’coffee’=>’#59524c’);
$get_selected_color = $color_schemes[$get_active_color];


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s