{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openvisual.org/schema/visual-snow/1.2",
  "title": "OVS: Visual Snow (VSS)",
  "description": "Persistent TV-static-like visual noise. The defining symptom of Visual Snow Syndrome. Extends ovs:visual-noise.",
  "allOf": [
    {
      "$ref": "https://openvisual.org/schema/visual-noise/1.2"
    },
    {
      "type": "object",
      "properties": {
        "ovs_type": {
          "const": "ovs:visual-snow"
        },
        "color_rgba": {
          "type": "string",
          "description": "CSS sRGB colour, used when color_mode is tinted",
          "pattern": "^(#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?|rgba?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*(,\\s*(0|1(\\.0+)?|0?\\.\\d+)\\s*)?\\))$"
        },
        "grain_size_um": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Side length of one noise element, in micrometres on the display"
        },
        "grain_size_dva": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Side length of one noise element, in degrees of visual angle"
        },
        "update_rate_hz": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "How many times per second the noise pattern changes"
        },
        "motion_speed_um_per_sec": {
          "type": "number",
          "minimum": 0,
          "description": "Coherent drift speed of the pattern, for non-random patterns, in micrometres per second on the display"
        },
        "motion_speed_dva_per_sec": {
          "type": "number",
          "minimum": 0,
          "description": "Coherent drift speed of the pattern, for non-random patterns, in degrees of visual angle per second"
        },
        "pattern": {
          "type": "string",
          "enum": [
            "random",
            "brownian",
            "circular",
            "linear"
          ],
          "description": "Temporal behaviour of the noise"
        },
        "color_mode": {
          "type": "string",
          "enum": [
            "white",
            "tinted",
            "rainbow"
          ],
          "description": "Snow color mode"
        },
        "coverage_fraction": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Share of the field occupied by noise elements (element density)"
        },
        "element_spacing_um": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Distance between neighbouring noise elements, in micrometres on the display"
        },
        "element_spacing_dva": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Distance between neighbouring noise elements, in degrees of visual angle"
        },
        "rms_contrast": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Root mean square contrast of the noise"
        },
        "luminance_cd_m2": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Luminance of the noise elements"
        },
        "polarity": {
          "type": "string",
          "enum": [
            "lighter",
            "darker",
            "both"
          ],
          "description": "Whether elements are lighter than, darker than, or both relative to the background"
        },
        "field_extent": {
          "type": "string",
          "enum": [
            "entire_field",
            "partial",
            "unknown"
          ],
          "description": "Whether the snow covers the entire visual field"
        }
      }
    }
  ],
  "unevaluatedProperties": false
}
