---
title: Scales
description: How OWLF keeps each app's own mood and sleep steps.
---

A scale describes the app's own rating steps, worst to best. OWLF never converts a 5-face scale into a 7-point one: consumers do that, and can show why.

```json
{
  "size": 5,
  "levels": [
    { "id": "awful", "label": "awful", "position": 0, "color": "#5f6b73" },
    { "id": "meh", "label": "meh", "position": 2 },
    { "id": "chillig", "label": "chillig", "position": 3 },
    { "id": "rad", "label": "rad", "position": 4 }
  ]
}
```

## Scale

| Field | Required | Purpose |
| --- | --- | --- |
| `size` | Yes | Number of positions: 5 for a 1–5 scale. |
| `levels` | Yes | At least one level. |
| `continuous` | No | `{ min, max, unit? }` for sliders. Levels are then equal bands of `min..max`. |

## Level

| Field | Required | Purpose |
| --- | --- | --- |
| `id` | Yes | Unique in its scale. Entries reference it. |
| `label` | Yes | As the app shows it: "rad", "7", "Very good". |
| `position` | Yes | `0..size-1`, 0 = worst. Several levels may share a position, e.g. custom moods in one group. |
| `color` | No | `#rrggbb`, the app's color for this level. |
| `valence` | No | The adapter's reading of the level's meaning, `-1..1`. |

## Mapping to another scale

Consumers map a level by `valence` when present, else by `position / (size - 1)`. A scale of size 1 maps to the middle.

Set `valence` only when position misleads. Example: Moodnotes shows 5 faces but stores 7 values, so each of the 7 levels carries its own valence from -1 to 1.

:::note
Apps without a mood rating, like plain journals, set `scales.mood` to `null`.
:::
