I just create my first Chrome extension. My extension's icon shows correctly (with color) in the extension manager page:
But Chrome shows a grayscale version of my icon in the extension bar:
Here's the manifest of my extension:
{
"name": "__MSG_appName__",
"version": "0.0.1",
"manifest_version": 2,
"description": "__MSG_appDescription__",
"icons": {
"16": "images/icon-16.png",
"128": "images/icon-128.png"
},
"default_locale": "en",
"background": {
"scripts": [
"scripts/chromereload.js",
"scripts/background.js"
]
},
"permissions": [
"tabs",
"http://*/*",
"https://*/*",
"contentSettings"
],
"content_scripts": [
{
"matches": [
"http://*/*",
"https://*/*"
],
"js": [
"scripts/contentscript.js"
],
"run_at": "document_end",
"all_frames": false
}
]
}
What can I do to make Chrome show my icon with color next to the address bar?
Thanks
If you see a message saying "Extensions Disabled," it's because Chrome has turned off one or more of your extensions to keep your data safe while you're browsing the Internet. The extensions that Chrome turned off either didn't come from the Chrome Web Store or were determined unsafe.
To the right of your address bar, find your extensions' icons. On your computer, open Chrome. Drag the extension's icon to its new place.
Install Color Picker extension from Chrome store. After installing visit any webpage from where you want to grab a color code. Then click on the extension icon and it will enable the color picker cusror icon. Now tap on the desired point and it will give you the info of that color code in HEX and RGB options.
That is odd behaviour, I don't know why it's happening but I know the solution: you should be using default_icon
instead of icon
:
"browser_action": {
"default_icon": "icon.png"
}
Note that the icon needs to be 19x19 or 38x38 pixels.
You've defined the larger icon correctly though so you could leave that as is.
See here for more info.
Based on my experience and on Noam's answer I'm tempted to say that it is because your extension doesn't have a "browser_action"
defined. In other words: its icon is there to show it is installed, but it doesn't do anything, so it had its colors removed.
This is just a guess not confirmed by any documentation or test.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With