## Layer styles

Layer styles are a layer's `sy` list, not `ef` entries. Each style is an object with a whole-number `ty` and properties such as `{"a":0,"k":5}`:

```json
{"ty":7,"c":{"a":0,"k":[1,0.2,0.1]},"so":{"a":0,"k":60},"bm":{"a":0,"k":1}}
```

| Style | Property | Type | Default | Notes |
| --- | --- | --- | --- | --- |
| `ty:7` color overlay | `c` | property: RGB, 0–1 | `[1,0,0]`, red | |
| | `so` | property: number | 100 | Opacity 0–100 (not `o`) |
| | `bm` | `{"k":whole number}` | 1, normal | [Style blend mode](#style-blend-modes) |
| `ty:0` stroke | `c` | property: RGB | `[1,0,0]`, red | Opacity is full, blend is normal, and the stroke sits outside the layer. |
| | `s` | property: number | 3 | Size in pixels |
| `ty:3` outer glow | `c` | property: RGB | `[1,1,0.75]` | |
| | `o` | property: number | 75 | Opacity 0–100 |
| | `s` | property: number | 5 | Size in pixels |
| | `ch` | property: number | 0 | Spread 0–100, a percentage of size |
| | `r` | property: number | 50 | Range 0–100 |
| | `bm` | `{"k":whole number}` | 11, screen | |
| | `tc` | `{"k":whole number}` | 1, softer | Technique: 1 softer, 2 precise |
| | `no`, `j` | | None | Noise and jitter are ignored (`warnings` when set) |
| `ty:1` drop shadow | `c` | property: RGB | `[0,0,0]`, black | |
| | `o` | property: number | 75 | Opacity 0–100 |
| | `a` | property: number | 120 | Angle in degrees |
| | `d`, `s` | property: number | 5, 5 | Distance and size in pixels |
| | `ch` | property: number | 0 | Spread 0–100 |
| | `bm` | `{"k":whole number}` | 5, multiply | |
| | `lc` | `{"k":whole number}` | 1 | Layer knocks out drop shadow. Changes nothing. |
| | `ga` | `{"k":whole number}` | 0 | Use Global Light is not applied: the shadow always uses its own `a`. Turn it off. Blitframe warns when `ga` is 1. |

- A field you leave out takes the value in the Default column, which is After Effects' own dialog default. Use Global Light is the exception: the shadow always uses its own `a`. Write every field you rely on.
- Only these `ty` values render. Inner shadow, inner glow, bevel, satin and gradient overlay are skipped.
- Colors, opacity, size, spread, angle, distance and range can be keyframed. `bm` and `tc` are static whole numbers.
- Write every field as an object with `k`.
- Image, solid, video, precomposition, text and shape layers can carry styles. A 3D model layer draws neither effects nor styles, and an adjustment layer draws no styles, with a warning for both.
- Styles composite after the layer's effects and transform, in pixels of the containing composition. Scaling a layer does not scale its style's size, spread or distance.

### Style blend modes

A style's `bm.k` uses its own numbers. Don't copy a layer's `bm` into a style: multiply is `1` on a layer and `5` on a style.

| `bm.k` | Mode | `bm.k` | Mode | `bm.k` | Mode |
| --- | --- | --- | --- | --- | --- |
| 1 | normal | 13 | linear dodge | 22 | hard mix |
| 4 | darken | 14 | lighter color | 24 | difference |
| 5 | multiply | 16 | overlay | 25 | exclusion |
| 6 | color burn | 17 | soft light | 26 | subtract |
| 7 | linear burn | 18 | hard light | 27 | divide |
| 8 | darker color | 19 | vivid light | 29 | hue |
| 10 | lighten | 20 | linear light | 30 | saturation |
| 11 | screen | 21 | pin light | 31 | color |
| 12 | color dodge | | | 32 | luminosity |

- Color overlay renders every mode in the table. On drop shadow and outer glow, 8, 14 and 27 render as normal.
- Any other value, such as 2 (dissolve), renders as normal. Blitframe warns about a style blend mode that renders as normal.

### Edge cases

- A style the engine cannot read is reported in `problems`, such as `"tc":2`, `"bm":11`, `"lc":1` or `"c":5` written bare. So is an `sy` that is not a list of style objects, such as `"sy":[5]` or a single style object.
- A few `bm` values far outside the list, such as `0.1` or `-5000000`, cannot render at all: `problems`.
- A `bm` without `k`, or `bm: null` or `[]`, reads as 0 and blends normal, not the drop shadow's multiply or the glow's screen (`warnings`).
- A `ty` that is not a whole number is read through its bytes (`warnings`):

| `ty` written as | Read as |
| --- | --- |
| Missing, `null`, `true`, `false`, `""`, `[]`, and many decimals such as `7.0` or `7.5` | 0: a stroke |
| A one-item list | 1: a drop shadow |
| A negative number, most strings, and decimals such as `0.1` | Skipped |
