Wednesday, December 6, 2017

Send me your Survivor Color Scheme ideas!

Release 2.58.1104 of the Manager adds support for a subscribers-only feature called Survivor Color Schemes.

Individual color schemes are simply HTML style strings (i.e. a series of CSS properties) that are applied to certain display elements in the Manager. If you are a CSS developer and you have an idea for a Survivor Color Scheme, I encourage you contribute your idea to the Manager!

Hit the jump for complete instructions!


Instructions

Here's what you should do to send me your scheme:

  1. Clone the project from GitHub.
  2. Find the file called /v2/api/assets/survivor_sheet_options.py
  3. In the python dictionary called 'survivor_color_schemes', add a new dictionary for your scheme.
  4. Send me a Pull Request.

How to define your new scheme

When creating your new scheme, consider the following example:
    'twilight_knight': {
        'name': 'Twilight Knight',
        'style': {
            'border-color': "#000",
            'background': 'radial-gradient(#919B9A, #273736, #0D1110)',
            'color': '#fff',
        },
    },

Every scheme needs a 'handle' and two attributes: name and style.

In the above example, the 'handle' is twilight_knight and the name is 'Twilight Knight'. The handle is used internally by the Manager and the name is what the users will see in the drop-down menu for choosing your scheme.


Add style properties to your scheme

The style attribute should be a python dictionary where each key/value pair, when taken as a whole, can be interpreted as a single CSS property.

In the above example, the key/value pair 'border-color': "#000" will ultimately be interpreted by the Manager thus:
border-color: "#000"
And that's it! Your style dictionary can include any CSS properties you like and there is no limit to how many key/value pairs you can include!


Once I receive your Pull Request, I will review it and, if everything looks good, I will contact you about including it in the next release of the Manager!

No comments:

Post a Comment