Opera's lightweight themes

Introduction

Opera 12 brings us many improvements, including updates to the Opera skinning system. For a start, the updates are so extensive that we have renamed skins to themes. There is a new lightweight system that sits on top of the default Opera theme and makes simple customizations much easier to achieve. In this article we'll take a look at how this lightweight system works.

How does it work?

These new lightweight themes work in the same way as the existing themes system: they are packaged in a ZIP file, and contain two things, assets that you want to use in your theme, and a persona.ini file. The .ini file is how Opera recognises the ZIP file as a theme — when it encounters such a file (eg by following a link to it), it will automatically install the theme: a nice simple process. The theme applies is applied on top of the default Opera skin for your OS.

The persona.ini file contains a number of sections, each begun by a heading contained in square brackets, like so: [Options]. Each of these sections contains information to specify different parts of the theme, such as a custom background image, etc. the key here is simplicity — you can still use the old heavyweight theme system to create a full customization if you want, but a lot of people just want to do something simple, and don't want to risk breaking the UI. The lightweight system is much easier to use. In Opera 12 we are only allowing you to customize the background image, colorization, and which major parts of the UI the image shows through. More options may be added in the future.

In the next section we will run through a complete theme example to show how this all works.

Walking through an example

To try out an example theme, install Opera 12 and point it at our Opera themes page. Try clicking on one of the examples and you'll notice that your browser changes its style to look something like the following:

A sample Opera lightweight theme applied to Opera 12

Figure 1: An example theme in action.

You will find this theme listed along with any other themes you may have installed, in Tools > Appearance. From these you can choose to select between the different ones you've previously installed, or delete them. You can also make a theme available from the appearance dialog by placing it in the skin directory of your Opera profile. You can find this in [home folder]/Library/Opera on Mac and Linux, and C:\users\[user]\AppData\Roaming\Opera\Opera on Windows.

I have made a theme available for you to play with. If you save the ZIP file to your machine, then unzip it, you'll find assets, plus the personas.ini file, which contains the following sections:

# This file describes a test persona for the Opera browser. Not meant for redistribution.

This is a comment, to give some background information about the theme. You can put comments anywhere you like in the file, as long as they are written on a separate line and started with a hash/pound symbol (#).

[Info]
Name                          = The Natural History of Norway
Author                        = Opera Software
Version                       = 1
Preview Image                 =

The [Info] section is quite self explanatory. The Name is the name of the theme, as it will appear in the Appearance dialog, on the upcoming Opera themes catalog, etc. The [Author] is the author of the theme, and [Version] should always be set as 1 (this means "version 1 of the lightweight theme system"). Preview Image is supposed to provide a preview for catalogs, etc., but is not currently being used.

[Options]
Tint Color                = #3e6da9

An optional section: if specified, Tint Color overrides the current colorization with a specific color tint — we colorize with the average colour of the image. Some of the themes, when installed, will add a colouration/tint over the top of the theme.

Tint Color has an alias, Colorize Color, which you can use instead, but I think you'll agree that Tint Color is a bit more intuitive.

[Window Image]
Type                          = BestFit
Background                = Kraken.jpg
Colorize                      = 0

The [Window Image] section controls settings of the whole browser window. The Type is set to BestFit to indicate that Opera will fit a single copy of the image in the best way it can. The other available setting is BoxTile, which tiles the image. The Background line specifies the path to the image that will be used as a custom background image for the theme. Colorize = 0 specifies that you don't want the custom image colorized in the same way as the rest of the UI. Set it to 1 if you do.

[Clear elements]
Speed Dial Widget Blank Skin  = 1
Speed Dial Widget Skin        = 1
Window Skin                   = 1
Document Window Skin          = 1

Setting these properties all to 1 will cause the background image to shine through the speed dial. If they are missing or set to 0, it won't.

You can't do much else inside lightweight themes, although we may add more options later. This sounds limiting, you might say, but this is deliberate — themes are for applying small changes. If you want to make more extensive changes, you'll still use the full theming system. But this new way is a lot simpler to write and apply.

Installing and sharing a theme

When you've created a theme, you'll want to share it with others so they can see your handiwork. The best way to do this is to upload it to our Themes repository — to do this, use our Opera addons developer upload page. You'll need a my.opera user account to do so. Sharing your theme like this means that it will be easily findable by others, and our team will also check it thoroughly for errors before making it public.

Note that if you instead upload it to your own web server, you'll need to make sure you serve it with the correct mime type, otherwise it won't install. To do this, put the following inside an .htaccess file in the same directory (for an Apache-based server, of course — other server types will require a different but equivalent fix):

<files *.zip>
  ForceType application/x-opera-configuration-skin
</files>

Summary

I hope you found our walkthrough of Opera lightweight themes helpful. Let us know what you think!

Chris Mills is a web technologist, open standards evangelist and education agitator, currently working at Opera Software in the developer relations team. He spends most of his time writing articles about web standards for dev.opera.com and other publications (such as .net mag and A List Apart), giving talks at universities and industry conferences, and lobbying universities to improve their web education courses. He believes that education is the answer to everything, but in particular he is passionate about using education to improve the overall content quality, accessibility, usability and future-viability of the Web.

He is the creator of the Opera Web standards curriculum, contributor to the WaSP InterACT project, and coauthor of InterACT with web standards: A Holistic Approach to Web Design. In August 2011, he also accepted the position of co-chair of the newly-formed Web Education Community Group.

Outside work he is a heavy metal drummer, proud father of three and lover of good beer.


This article is licensed under a Creative Commons Attribution 3.0 Unported license.

Comments

The forum archive of this article is still available on My Opera.

  • photo

    Jorge Campos

    Sunday, December 11, 2011

    When will we be able to upload our themes?
  • photo

    Chris Mills

    Monday, December 12, 2011

    I'll inquire about this with the team.
  • photo

    Enio San

    Sunday, December 18, 2011

    I was looking forward for this feature!
    Looking forward to be part of the Opera Theme designer community!
  • photo

    komang acong

    Thursday, December 22, 2011

    so amazing
  • photo

    Unrealmirakulix

    Saturday, December 31, 2011

    please give us a possibility to upload and more themes...
  • photo

    Chris Mills

    Monday, January 9, 2012

    @Unrealmirakulix sorry for the delay on this. I have asked the relevant developer team to see how far away this currently is.

    Best regards.
  • photo

    Chris Mills

    Monday, January 9, 2012

    Update: I've been told by the development team that the Theme upload functionality should be available in early February. I'll post more updates as I get them.
  • photo

    idice

    Friday, January 20, 2012

    NONE of TOOLBARS are covered with personas
    i nearly feel no change when surfing with the new browser especially when surfing with maximized window
  • photo

    Chris Mills

    Monday, January 23, 2012

    They work ok on Opera 12/Opera next, but currently not on the latest stable Opera (11.60). Have you got any more specific feedback on what you like them to do? They are currently at an early stage.
  • photo

    idice

    Friday, January 27, 2012

    pls support other toolbars skining like firefox, they are important as as tab bar
  • photo

    Jim

    Friday, February 17, 2012

    It would be nice if the original themes where integrated into this new system. It seems senseless to separate them completely.

    There are many very creative themes people made already, and I know a few people who use Opera just because it is so flexible in that way.
  • photo

    Chris Mills

    Monday, February 20, 2012

    @Jim the eventual idea is that you will be able to apply a customized skin, and then put a theme over the top of that, to provide a little more tweaking and customization. For those of us who just want to add a different background image, and don't want to wade through the skinning process, themes make things easier. I think it adds an extra level of flexibility. Does this help you with the idea?

    Please feel free to share your thoughts in more detail - it is always useful to get this kind of feedback.
  • photo

    Jim

    Tuesday, March 6, 2012

    @Chris

    Yes I think I understand. You want to give the option to have a personal image in the background even when using a custom skin.

    Do you know what the Radius option does. I notice it is used in one of the themes.
  • photo

    Chris Mills

    Friday, March 9, 2012

    @Jim - I asked about this, because I wasn't sure. Radius was apparently removed from the functionality list, so is non functional and shouldn't be used. We'll get it removed from the examples to avoid confusion.
  • photo

    manish1211

    Friday, March 16, 2012

    sir koi v aps install nhi ho rha ka karo plz helpppppppp meeeeeeeeee
  • photo

    cold deep ocean

    Thursday, April 26, 2012

    its amazing but i guess the last one was a little bit better
  • photo

    cethoss

    Friday, April 27, 2012

    I am afraid this will further kill skinning. Back in the day it was way simpler to edit a skin. Skins were unique. Call me a fossil or compare recent skins with those published 4-5 yrs ago.
    It's like car models aerodynamics made them all look alike. Thanks to windows 7 and its transparency thing, which I never liked, this was the only direction to take I guess. I hope a handful designs that I like keep working with the new versions.
  • photo

    Chris Mills

    Friday, April 27, 2012

    @cethoss the classic opera skinning system is not going to be killed - skins and themes will work side by side. The idea is that eventually you will install a skin, and then you can put a theme over the top of that, to further customise the skin, adding a custom graphic or tint. I'm sorry this was not made clearer, and hope that clarifies things somewhat.
  • photo

    Chris Mills

    Tuesday, May 1, 2012

    You can now upload your themes to our theme repository using the addons upload form at https://addons.opera.com/en/developer/upload/
  • photo

    Richard E. Botbyl

    Thursday, May 10, 2012

    Is it currently possible for a theme to adopt the color scheme that the skin has been tinted with? It would be nice for skins and themes to be found under separate tabs (and folders). Presently, a custom skin and a theme can both be loaded but it requires either editing operaperfs.ini or selecting a skin with OK and then highlight a theme and then closing the appearance dialog with the X button. Is an easier method coming?
  • photo

    pumpki

    Friday, May 11, 2012

    I'm seeing an issue with how text is displayed with the new themes...

    Let's say you use a really dark photo for the background of the theme then you look at the page title. Its completely unreadable. This is the same with tabs.

    Shouldn't there be a text colour associated with the theme itself?
    Rather than using a skin which changes the text colour then applying a theme over that which could have the same problems. (apply dark skin with white text then add a bright coloured theme.)
  • photo

    Chris Mills

    Friday, May 11, 2012

    @Richard E. Botbyl, pumpki — thank you for the feedback. I think it makes sense, and I will pass your ideas on to the theme developers.
  • photo

    Enoch Appiah Junior

    Thursday, May 17, 2012

    Chris, how can i upload the themes online.. what file format should i convert them to?
  • photo

    Chris Mills

    Thursday, May 17, 2012

    @Enoch Hi! The themes should be packages using a standard ZIP file.
  • photo

    Enoch Appiah Junior

    Sunday, May 20, 2012

    What should be the extension?

You must be logged in to write a comment. If you're not a registered member, please sign up.