Cotton code
258 lines · 5.6 KB · JSONRaw
{  "format_version": 1,  "id": "health",  "purpose": "How everything inside Cotton Health looks, on iPhone and Android alike: near-monochrome, bold titles, generous space, colour only for a result's state (in range, borderline, out of range), values in the mono face. No fan, no cards as objects, no paper. Phones read these values through health.look and write no colour or size of their own.",  "fonts": {    "mono": {      "family": "JetBrains Mono",      "licence": "SIL OFL 1.1",      "weights": [        400,        600      ]    },    "sans": {      "family": "Inter",      "licence": "SIL OFL 1.1",      "weights": [        400,        500,        600,        700      ]    }  },  "colours": {    "dark": {      "accent": "#FAFAFA",      "attention": "#FBBF24",      "attention_wash": "#2B2110",      "background": "#000000",      "danger": "#F87171",      "danger_wash": "#2D1414",      "disabled": "#52525B",      "field": "#27272A",      "on_accent": "#09090B",      "on_tint": "#FAFAFA",      "raised": "#1F1F23",      "safe": "#4ADE80",      "safe_wash": "#0F2A1A",      "scrim": "#000000A3",      "secondary": "#A1A1AA",      "separator": "#2E2E33",      "sheet": "#1C1C1F",      "surface": "#18181B",      "tertiary": "#8B8B94",      "text": "#FAFAFA",      "tint.0": "#3F3F46",      "tint.1": "#52525B",      "tint.2": "#44403C",      "tint.3": "#57534E",      "tint.4": "#334155",      "tint.5": "#475569",      "tint.6": "#374151",      "tint.7": "#4B5563"    },    "light": {      "accent": "#09090B",      "attention": "#B45309",      "attention_wash": "#FFF7E6",      "background": "#FFFFFF",      "danger": "#B91C1C",      "danger_wash": "#FEF2F2",      "disabled": "#A1A1AA",      "field": "#F4F4F5",      "on_accent": "#FFFFFF",      "on_tint": "#18181B",      "raised": "#FFFFFF",      "safe": "#15803D",      "safe_wash": "#ECFDF3",      "scrim": "#00000066",      "secondary": "#52525B",      "separator": "#E4E4E7",      "sheet": "#FFFFFF",      "surface": "#F4F4F5",      "tertiary": "#71717A",      "text": "#09090B",      "tint.0": "#E4E4E7",      "tint.1": "#D4D4D8",      "tint.2": "#E7E5E4",      "tint.3": "#D6D3D1",      "tint.4": "#E2E8F0",      "tint.5": "#CBD5E1",      "tint.6": "#E5E7EB",      "tint.7": "#D1D5DB"    }  },  "type": {    "body": {      "font": "sans",      "size": 17.0,      "weight": 400,      "line": 22.0,      "tracking": 0.0    },    "button": {      "font": "sans",      "size": 17.0,      "weight": 600,      "line": 22.0,      "tracking": 0.0    },    "chip": {      "font": "sans",      "size": 15.0,      "weight": 500,      "line": 20.0,      "tracking": 0.0    },    "code": {      "font": "mono",      "size": 28.0,      "weight": 600,      "line": 34.0,      "tracking": 2.0    },    "headline": {      "font": "sans",      "size": 17.0,      "weight": 600,      "line": 22.0,      "tracking": 0.0    },    "initials": {      "font": "sans",      "size": 17.0,      "weight": 700,      "line": 22.0,      "tracking": 0.0    },    "label": {      "font": "sans",      "size": 13.0,      "weight": 500,      "line": 18.0,      "tracking": 0.10000000149011612    },    "large_title": {      "font": "sans",      "size": 34.0,      "weight": 700,      "line": 41.0,      "tracking": -0.4000000059604645    },    "row_detail": {      "font": "sans",      "size": 15.0,      "weight": 400,      "line": 20.0,      "tracking": 0.0    },    "row_title": {      "font": "sans",      "size": 17.0,      "weight": 600,      "line": 22.0,      "tracking": 0.0    },    "secret": {      "font": "mono",      "size": 17.0,      "weight": 400,      "line": 24.0,      "tracking": 0.5    },    "secret_large": {      "font": "mono",      "size": 28.0,      "weight": 600,      "line": 34.0,      "tracking": 1.0    },    "section": {      "font": "sans",      "size": 13.0,      "weight": 600,      "line": 18.0,      "tracking": 0.4000000059604645    },    "title": {      "font": "sans",      "size": 22.0,      "weight": 700,      "line": 28.0,      "tracking": -0.20000000298023224    },    "unit": {      "font": "sans",      "size": 13.0,      "weight": 500,      "line": 18.0,      "tracking": 0.10000000149011612    },    "value": {      "font": "mono",      "size": 17.0,      "weight": 600,      "line": 22.0,      "tracking": 0.0    },    "value_large": {      "font": "mono",      "size": 34.0,      "weight": 600,      "line": 41.0,      "tracking": -0.4000000059604645    }  },  "space": {    "chart_height": 200.0,    "chart_line": 2.0,    "chart_point": 6.0,    "gutter": 16.0,    "l": 16.0,    "m": 12.0,    "mark": 8.0,    "picture": 40.0,    "row_height": 64.0,    "s": 8.0,    "tap": 44.0,    "trend_height": 24.0,    "trend_width": 64.0,    "xl": 24.0,    "xs": 4.0,    "xxl": 32.0,    "xxs": 2.0,    "xxxl": 48.0  },  "corners": {    "button": 14.0,    "card": 16.0,    "chip": 999.0,    "field": 12.0,    "picture": 10.0,    "row": 12.0,    "sheet": 24.0  },  "roles": {    "attention": "attention",    "borderline": "attention",    "borderline_wash": "attention_wash",    "danger": "danger",    "in_range": "safe",    "in_range_wash": "safe_wash",    "main_action": "accent",    "neutral": "secondary",    "no_range": "tertiary",    "on_main_action": "on_accent",    "out_of_range": "danger",    "out_of_range_wash": "danger_wash",    "row_detail": "secondary",    "row_title": "text",    "safe": "safe",    "section": "tertiary",    "trend_band": "surface",    "trend_line": "secondary",    "trend_point": "text"  }}