OLD | NEW |
| (Empty) |
1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | |
2 1) The <head> information in this page is significant, should be uniform | |
3 across api docs and should be edited only with knowledge of the | |
4 templating mechanism. | |
5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | |
6 browser, it will be re-generated from the template, json schema and | |
7 authored overview content. | |
8 4) The <body>.innerHTML is also generated by an offline step so that this | |
9 page may easily be indexed by search engines. | |
10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | |
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | |
13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | |
14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> | |
15 </script> | |
16 <script type="text/javascript" src="../../../../third_party/json_minify/mini
fy-sans-regexp.js"> | |
17 </script> | |
18 <script type="text/javascript" src="js/api_page_generator.js"></script> | |
19 <script type="text/javascript" src="js/bootstrap.js"></script> | |
20 <script type="text/javascript" src="js/sidebar.js"></script> | |
21 <title>Themes - Google Chrome Extensions - Google Code</title></head> | |
22 <body> <div id="devModeWarning" class="displayModeWarning"> | |
23 You are viewing extension docs in chrome via the 'file:' scheme: are you exp
ecting to see local changes when you refresh? You'll need run chrome with --allo
w-file-access-from-files. | |
24 </div> | |
25 <div id="branchWarning" class="displayModeWarning"> | |
26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. | |
27 It may not work with the stable release of Chrome.</span> | |
28 <select id="branchChooser"> | |
29 <option>Choose a different version... | |
30 </option><option value="">Stable | |
31 </option><option value="beta">Beta | |
32 </option><option value="dev">Dev | |
33 </option><option value="trunk">Trunk | |
34 </option></select> | |
35 </div> | |
36 <div id="unofficialWarning" class="displayModeWarning"> | |
37 <span>WARNING: This is unofficial documentation. It may not work with the | |
38 current release of Chrome.</span> | |
39 <button id="goToOfficialDocs">Go to the official docs</button> | |
40 </div> | |
41 <div id="gc-container" class="labs"> | |
42 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | |
43 <!-- In particular, sub-templates that recurse, must be used by allowing | |
44 jstemplate to make a copy of the template in this section which | |
45 are not operated on by way of the jsskip="true" --> | |
46 <!-- /SUBTEMPLATES --> | |
47 <a id="top"></a> | |
48 <div id="skipto"> | |
49 <a href="#gc-pagecontent">Skip to page content</a> | |
50 <a href="#gc-toc">Skip to main navigation</a> | |
51 </div> | |
52 <!-- API HEADER --> | |
53 <table id="header" width="100%" cellspacing="0" border="0"> | |
54 <tbody><tr> | |
55 <td valign="middle"><a href="http://code.google.com/"><img src="images/c
ode_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:
0; margin:0;"></a></td> | |
56 <td valign="middle" width="100%" style="padding-left:0.6em;"> | |
57 <form action="http://www.google.com/cse" id="cse" style="margin-top:0.
5em"> | |
58 <div id="gsc-search-box"> | |
59 <input type="hidden" name="cx" value="002967670403910741006:61_cvz
fqtno"> | |
60 <input type="hidden" name="ie" value="UTF-8"> | |
61 <input type="text" name="q" value="" size="55"> | |
62 <input class="gsc-search-button" type="submit" name="sa" value="Se
arch"> | |
63 <br> | |
64 <span class="greytext">e.g. "page action" or "tabs"</span> | |
65 </div> | |
66 </form> | |
67 <script type="text/javascript" src="https://www.google.com/jsapi"></sc
ript> | |
68 <script type="text/javascript">google.load("elements", "1", {packages:
"transliteration"});</script> | |
69 <script type="text/javascript" src="https://www.google.com/coop/cse/t1
3n?form=cse&t13n_langs=en"></script> | |
70 <script type="text/javascript" src="https://www.google.com/coop/cse/br
and?form=cse&lang=en"></script> | |
71 </td> | |
72 </tr> | |
73 </tbody></table> | |
74 <div id="codesiteContent" class=""> | |
75 <a id="gc-topnav-anchor"></a> | |
76 <div id="gc-topnav"> | |
77 <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Lab
s</a>)</h1> | |
78 <ul id="home" class="gc-topnav-tabs"> | |
79 <li id="home_link"> | |
80 <a href="index.html" title="Google Chrome Extensions home page">Home
</a> | |
81 </li> | |
82 <li id="docs_link"> | |
83 <a href="docs.html" title="Official Google Chrome Extensions documen
tation">Docs</a> | |
84 </li> | |
85 <li id="faq_link"> | |
86 <a href="faq.html" title="Answers to frequently asked questions abou
t Google Chrome Extensions">FAQ</a> | |
87 </li> | |
88 <li id="samples_link"> | |
89 <a href="samples.html" title="Sample extensions (with source code)">
Samples</a> | |
90 </li> | |
91 <li id="group_link"> | |
92 <a href="http://groups.google.com/a/chromium.org/group/chromium-exte
nsions" title="Google Chrome Extensions developer forum">Group</a> | |
93 </li> | |
94 <li id="so_link"> | |
95 <a href="http://stackoverflow.com/questions/tagged/google-chrome-ext
ension" title="[google-chrome-extension] tag on Stack Overflow">Questions?</a> | |
96 </li> | |
97 </ul> | |
98 </div> <!-- end gc-topnav --> | |
99 <div class="g-section g-tpl-170"> | |
100 <!-- SIDENAV --> | |
101 <div class="g-unit g-first" id="gc-toc"> | |
102 <ul> | |
103 <li><a href="getstarted.html">Getting Started</a></li> | |
104 <li><a href="overview.html">Overview</a></li> | |
105 <li><a href="whats_new.html">What's New?</a></li> | |
106 <li><h2><a href="devguide.html">Developer's Guide</a></h2> | |
107 <ul> | |
108 <li>Browser UI | |
109 <ul> | |
110 <li><a href="browserAction.html">Browser Actions</a></li> | |
111 <li><a href="contextMenus.html">Context Menus</a></li> | |
112 <li><a href="notifications.html">Desktop Notifications</a></li
> | |
113 <li><a href="omnibox.html">Omnibox</a></li> | |
114 <li><a href="options.html">Options Pages</a></li> | |
115 <li><a href="override.html">Override Pages</a></li> | |
116 <li><a href="pageAction.html">Page Actions</a></li> | |
117 </ul> | |
118 </li> | |
119 <li>Browser Interaction | |
120 <ul> | |
121 <li><a href="bookmarks.html">Bookmarks</a></li> | |
122 <li><a href="cookies.html">Cookies</a></li> | |
123 <li><a href="devtools.html">Developer Tools</a></li> | |
124 <li><a href="events.html">Events</a></li> | |
125 <li><a href="history.html">History</a></li> | |
126 <li><a href="management.html">Management</a></li> | |
127 <li><a href="tabs.html">Tabs</a></li> | |
128 <li><a href="windows.html">Windows</a></li> | |
129 </ul> | |
130 </li> | |
131 <li>Implementation | |
132 <ul> | |
133 <li><a href="a11y.html">Accessibility</a></li> | |
134 <li><a href="background_pages.html">Background Pages</a></li> | |
135 <li><a href="content_scripts.html">Content Scripts</a></li> | |
136 <li><a href="xhr.html">Cross-Origin XHR</a></li> | |
137 <li><a href="i18n.html">Internationalization</a></li> | |
138 <li><a href="messaging.html">Message Passing</a></li> | |
139 <li><a href="permissions.html">Optional Permissions</a></li> | |
140 <li><a href="npapi.html">NPAPI Plugins</a></li> | |
141 </ul> | |
142 </li> | |
143 <li>Finishing | |
144 <ul> | |
145 <li><a href="hosting.html">Hosting</a></li> | |
146 <li><a href="external_extensions.html">Other Deployment Option
s</a></li> | |
147 </ul> | |
148 </li> | |
149 </ul> | |
150 </li> | |
151 <li><h2><a href="apps.html">Packaged Apps</a></h2></li> | |
152 <li><h2><a href="tutorials.html">Tutorials</a></h2> | |
153 <ul> | |
154 <li><a href="tut_debugging.html">Debugging</a></li> | |
155 <li><a href="tut_analytics.html">Google Analytics</a></li> | |
156 <li><a href="tut_oauth.html">OAuth</a></li> | |
157 </ul> | |
158 </li> | |
159 <li><h2>Reference</h2> | |
160 <ul> | |
161 <li>Formats | |
162 <ul> | |
163 <li><a href="manifest.html">Manifest Files</a></li> | |
164 <li><a href="match_patterns.html">Match Patterns</a></li> | |
165 </ul> | |
166 </li> | |
167 <li><a href="permission_warnings.html">Permission Warnings</a></li
> | |
168 <li><a href="api_index.html">chrome.* APIs</a></li> | |
169 <li><a href="api_other.html">Other APIs</a></li> | |
170 </ul> | |
171 </li> | |
172 <li><h2><a href="samples.html">Samples</a></h2></li> | |
173 <div class="line"> </div> | |
174 <li><h2>More</h2> | |
175 <ul> | |
176 <li><a href="http://code.google.com/chrome/webstore/docs/index.htm
l">Chrome Web Store</a></li> | |
177 <li><a href="http://code.google.com/chrome/apps/docs/developers_gu
ide.html">Hosted Apps</a></li> | |
178 <li class="leftNavSelected">Themes</li> | |
179 </ul> | |
180 </li> | |
181 </ul> | |
182 </div> | |
183 <script> | |
184 initToggles(); | |
185 </script> | |
186 <div class="g-unit" id="gc-pagecontent"> | |
187 <div id="pageTitle"> | |
188 <h1 class="page_title">Themes</h1> | |
189 </div> | |
190 <!-- TABLE OF CONTENTS --> | |
191 <div id="toc"> | |
192 <h2>Contents</h2> | |
193 <ol> | |
194 <li> | |
195 <a href="#manifest"> Manifest </a> | |
196 <ol> | |
197 <li> | |
198 <a href="#colors">colors</a> | |
199 </li><li> | |
200 <a href="#images">images</a> | |
201 </li><li> | |
202 <a href="#properties">properties</a> | |
203 </li><li> | |
204 <a href="#tints">tints</a> | |
205 </li> | |
206 </ol> | |
207 </li><li> | |
208 <a href="#moredoc"> Additional documentation </a> | |
209 <ol> | |
210 </ol> | |
211 </li> | |
212 </ol> | |
213 </div> | |
214 <!-- /TABLE OF CONTENTS --> | |
215 <!-- Standard content lead-in for experimental API pages --> | |
216 <!-- STATIC CONTENT PLACEHOLDER --> | |
217 <div id="static"><div id="pageData-showTOC" class="pageData">true</div> | |
218 <p> | |
219 A <em>theme</em> is a special kind of extension | |
220 that changes the way the browser looks. | |
221 Themes are <a href="packaging.html">packaged</a> like regular extensions, | |
222 but they don't contain JavaScript or HTML code. | |
223 </p> | |
224 <p> | |
225 You can find and try a bunch of themes at the | |
226 <a href="https://chrome.google.com/webstore/category/themes">Chrome Web Store</a
>. | |
227 </p> | |
228 <img src="images/themes-1.gif" width="100" height="80" alt="grassy theme"> | |
229 <img src="images/themes-2.gif" width="100" height="80" alt="dark theme"> | |
230 <img src="images/themes-3.gif" width="100" height="80" alt="foggy theme"> | |
231 <h2 id="manifest"> Manifest </h2> | |
232 <p> | |
233 Here is an example | |
234 <a href="manifest.html"><code>manifest.json</code></a> | |
235 file for a theme: | |
236 </p> | |
237 <!-- [PENDING: This page should eventually be (or point to) something that's ver
y friendly to artists. You should only have to look at one page to create a the
me. --> | |
238 <pre>{ | |
239 "version": "2.6", | |
240 "name": "camo theme", | |
241 <b> "theme": { | |
242 "<a href="#images">images</a>" : { | |
243 "theme_frame" : "images/theme_frame_camo.png", | |
244 "theme_frame_overlay" : "images/theme_frame_stripe.png
", | |
245 "theme_toolbar" : "images/theme_toolbar_camo.png", | |
246 "theme_ntp_background" : "images/theme_ntp_background_
norepeat.png", | |
247 "theme_ntp_attribution" : "images/attribution.png" | |
248 }, | |
249 "<a href="#colors">colors</a>" : { | |
250 "frame" : [71, 105, 91], | |
251 "toolbar" : [207, 221, 192], | |
252 "ntp_text" : [20, 40, 0], | |
253 "ntp_link" : [36, 70, 0], | |
254 "ntp_section" : [207, 221, 192], | |
255 "button_background" : [255, 255, 255] | |
256 }, | |
257 "<a href="#tints">tints</a>" : { | |
258 "buttons" : [0.33, 0.5, 0.47] | |
259 }, | |
260 "<a href="#properties">properties</a>" : { | |
261 "ntp_background_alignment" : "bottom" | |
262 } | |
263 }</b> | |
264 } | |
265 </pre> | |
266 <h3 id="colors">colors</h3> | |
267 <p> | |
268 Colors are in RGB format. | |
269 To find the strings you can use within the "colors" field, | |
270 look for kColor* strings in | |
271 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/t
heme_service.cc"><code>theme_service.cc</code></a>. | |
272 </p> | |
273 <h3 id="images">images</h3> | |
274 <p> | |
275 Image resources use paths relative to the root of the extension. | |
276 You can override any of the images that are specified by | |
277 <code>kThemeableImages</code> in | |
278 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/t
heme_service.cc"><code>theme_service.cc</code></a>. | |
279 Just remove the "IDR_" | |
280 and convert the remaining characters to lowercase. | |
281 For example, <code>IDR_THEME_NTP_BACKGROUND</code> | |
282 (which <code>kThemeableImages</code> uses | |
283 to specify the background of the new tab pane) | |
284 corresponds to "theme_ntp_background". | |
285 </p> | |
286 <h3 id="properties">properties</h3> | |
287 <p> | |
288 This field lets you specify | |
289 properties such as background alignment, | |
290 background repeat, | |
291 and an alternate logo. | |
292 To see the properties and the values they can have, see | |
293 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/t
heme_service.cc"><code>theme_service.cc</code></a>. | |
294 <!-- [PENDING: We should flesh this out.] --> | |
295 </p> | |
296 <h3 id="tints">tints</h3> | |
297 <p> | |
298 You can specify tints to be applied to parts of the UI | |
299 such as buttons, the frame, and the background tab. | |
300 Google Chrome supports tints, not images, | |
301 because images don't work across platforms | |
302 and are brittle in the case of adding new buttons. | |
303 To find the strings you can use within the "tints" field, | |
304 look for kTint* strings in | |
305 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/t
heme_service.cc"><code>theme_service.cc</code></a>. | |
306 </p> | |
307 <p> | |
308 Tints are in Hue-Saturation-Lightness (HSL) format, | |
309 using floating-point numbers in the range 0 - 1.0: | |
310 </p> | |
311 <ul> | |
312 <li> | |
313 <b>Hue</b> is an absolute value, with 0 and 1 being red. | |
314 </li> | |
315 <li> | |
316 <b>Saturation</b> is relative to the currently provided image. | |
317 0.5 is <em>no change</em>, | |
318 0 is <em>totally desaturated</em>, | |
319 and 1 is <em>full saturation</em>. | |
320 </li> | |
321 <li> | |
322 <b>Lightness</b> is also relative, | |
323 with 0.5 being <em>no change</em>, | |
324 0 as <em>all pixels black</em>, | |
325 and 1 as <em>all pixels white</em>. | |
326 </li> | |
327 </ul> | |
328 <p> | |
329 You can alternatively use <code>-1.0</code> for any of the HSL values | |
330 to specify <em>no change</em>. | |
331 </p> | |
332 <h2 id="moredoc"> Additional documentation </h2> | |
333 <p> | |
334 Community-written documentation to help you write themes is here: | |
335 </p> | |
336 <blockquote> | |
337 <a href="http://code.google.com/p/chromium/wiki/ThemeCreationGuide">http://code.
google.com/p/chromium/wiki/ThemeCreationGuide</a> | |
338 </blockquote> | |
339 </div> | |
340 <!-- API PAGE --> | |
341 <!-- /apiPage --> | |
342 </div> <!-- /gc-pagecontent --> | |
343 </div> <!-- /g-section --> | |
344 </div> <!-- /codesiteContent --> | |
345 <div id="gc-footer" --=""> | |
346 <div class="text"> | |
347 <p> | |
348 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | |
349 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | |
350 Attribution 3.0 License</a>, and code samples are licensed under the | |
351 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | |
352 </p> | |
353 <p> | |
354 ©2011 Google | |
355 </p> | |
356 <!-- begin analytics --> | |
357 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> | |
358 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc
ript> | |
359 <script type="text/javascript"> | |
360 // chrome doc tracking | |
361 try { | |
362 var engdocs = _gat._getTracker("YT-10763712-2"); | |
363 engdocs._trackPageview(); | |
364 } catch(err) {} | |
365 // code.google.com site-wide tracking | |
366 try { | |
367 _uacct="UA-18071-1"; | |
368 _uanchor=1; | |
369 _uff=0; | |
370 urchinTracker(); | |
371 } | |
372 catch(e) {/* urchinTracker not available. */} | |
373 </script> | |
374 <!-- end analytics --> | |
375 </div> | |
376 </div> <!-- /gc-footer --> | |
377 </div> <!-- /gc-container --> | |
378 </body></html> | |
OLD | NEW |