1 <h1 class=
"page_title">Themes
</h1><p>
2 A
<em>theme
</em> is a special kind of extension
3 that changes the way the browser looks.
4 Themes are
<a href=
"packaging">packaged
</a> like regular extensions,
5 but they don't contain JavaScript or HTML code.
9 You can find and try a bunch of themes at the
10 <a href=
"https://chrome.google.com/webstore/category/themes">Chrome Web Store
</a>.
13 <img src=
"{{static}}/images/themes-1.png"
14 width=
"200" height=
"125" alt=
"green plants theme" />
16 <img src=
"{{static}}/images/themes-2.png"
17 width=
"200" height=
"125" alt=
"love smoke theme" />
19 <img src=
"{{static}}/images/themes-3.png"
20 width=
"200" height=
"125" alt=
"jus d'orange theme" />
22 <h2 id=
"manifest"> Manifest
</h2>
25 <a href=
"manifest"><code>manifest.json
</code></a>
29 <pre data-filename=
"manifest.json">
35 "theme_frame" :
"images/theme_frame_camo.png",
36 "theme_frame_overlay" :
"images/theme_frame_stripe.png",
37 "theme_toolbar" :
"images/theme_toolbar_camo.png",
38 "theme_ntp_background" :
"images/theme_ntp_background_norepeat.png",
39 "theme_ntp_attribution" :
"images/attribution.png"
42 "frame" : [
71,
105,
91],
43 "toolbar" : [
207,
221,
192],
44 "ntp_text" : [
20,
40,
0],
45 "ntp_link" : [
36,
70,
0],
46 "ntp_section" : [
207,
221,
192],
47 "button_background" : [
255,
255,
255]
50 "buttons" : [
0.33,
0.5,
0.47]
53 "ntp_background_alignment" :
"bottom"
59 <h3 id=
"colors">colors
</h3>
62 Colors are in RGB format.
63 To find the strings you can use within the
"colors" field,
64 look for kColor* strings in
65 <a href=
"http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/theme_service.cc"><code>theme_service.cc
</code></a>.
68 <h3 id=
"images">images
</h3>
71 Image resources use paths relative to the root of the extension.
72 You can override any of the images that are specified by
73 <code>kThemeableImages
</code> in
74 <a href=
"http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/theme_service.cc"><code>theme_service.cc
</code></a>.
75 Just remove the
"IDR_"
76 and convert the remaining characters to lowercase.
77 For example,
<code>IDR_THEME_NTP_BACKGROUND
</code>
78 (which
<code>kThemeableImages
</code> uses
79 to specify the background of the new tab pane)
80 corresponds to
"theme_ntp_background".
83 <h3 id=
"properties">properties
</h3>
86 This field lets you specify
87 properties such as background alignment,
89 and an alternate logo.
90 To see the properties and the values they can have, see
91 <a href=
"http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/theme_service.cc"><code>theme_service.cc
</code></a>.
95 <h3 id=
"tints">tints
</h3>
98 You can specify tints to be applied to parts of the UI
99 such as buttons, the frame, and the background tab.
100 Google Chrome supports tints, not images,
101 because images don't work across platforms
102 and are brittle in the case of adding new buttons.
103 To find the strings you can use within the
"tints" field,
104 look for kTint* strings in
105 <a href=
"http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/themes/theme_service.cc"><code>theme_service.cc
</code></a>.
109 Tints are in Hue-Saturation-Lightness (HSL) format,
110 using floating-point numbers in the range
0 -
1.0:
115 <b>Hue
</b> is an absolute value, with
0 and
1 being red.
118 <b>Saturation
</b> is relative to the currently provided image.
119 0.5 is
<em>no change
</em>,
120 0 is
<em>totally desaturated
</em>,
121 and
1 is
<em>full saturation
</em>.
124 <b>Lightness
</b> is also relative,
125 with
0.5 being
<em>no change
</em>,
126 0 as
<em>all pixels black
</em>,
127 and
1 as
<em>all pixels white
</em>.
132 You can alternatively use
<code>-
1.0</code> for any of the HSL values
133 to specify
<em>no change
</em>.
137 <h2 id=
"moredoc"> Additional documentation
</h2>
140 Community-written documentation to help you write themes is here:
144 <a href=
"http://code.google.com/p/chromium/wiki/ThemeCreationGuide">http://code.google.com/p/chromium/wiki/ThemeCreationGuide
</a>