# setColor

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /json-rpc/input/color:
    post:
      summary: setColor
      deprecated: false
      description: >-
        Set a color for all LEDs or provide a pattern of LED colors.

        For best practices on using priorites, see [Components &
        Priorities](https://api.hyperion-project.org/components-priorities-1024426m0.md).
      tags:
        - Hyperion API/Controls/Input Controls
        - Websocket
        - HTTP/S
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                command:
                  type: string
                  enum:
                    - color
                  description: The type of command to execute.
                instance:
                  type: array
                  items: &ref_0
                    $ref: '#/components/schemas/instance%20-%20single'
                  uniqueItems: true
                  description: >-
                    List of instance indices (0-254) to which the command
                    applies. An empty array applies a command to all instances.
                color:
                  type: array
                  items:
                    type: integer
                    minimum: 0
                    maximum: 255
                  minItems: 3
                  description: >-
                    RGB triplet or pattern (each LED gets 3 values: R, G, B from
                    0–255).
                priority:
                  type: integer
                  minimum: 1
                  maximum: 253
                  description: >-
                    The priority of this input (1-253). Lower values override
                    higher ones.
                origin:
                  type: string
                  minLength: 4
                  maxLength: 20
                  description: Origin string (4-20 characters), e.g., the application name.
                duration:
                  type: integer
                  examples:
                    - -1
                  minimum: -1
                  description: >-
                    Duration in milliseconds to keep this input. Use -1 for
                    indefinite duration.
                tan:
                  type: integer
                  minimum: 0
                  examples:
                    - 4711
                  description: Transaction number for tracking requests and responses.
              additionalProperties: false
              x-apidog-orders:
                - command
                - 01JVFF0Y93620XZSVKFBAVHEJB
                - color
                - 01JVFHN08EBAD43BZ0H5Q3XTCH
                - 01JVFHN70X6XCEYVSZ17Z5HAY9
              x-apidog-refs:
                01JVFF0Y93620XZSVKFBAVHEJB:
                  $ref: '#/components/schemas/instance%20-%20multiple'
                01JVFHN08EBAD43BZ0H5Q3XTCH:
                  $ref: '#/components/schemas/priorityParameters'
                01JVFHN70X6XCEYVSZ17Z5HAY9:
                  $ref: '#/components/schemas/tan'
              required:
                - color
                - priority
              x-apidog-ignore-properties:
                - instance
                - priority
                - origin
                - duration
                - tan
            examples:
              '1':
                value:
                  command: color
                  instance: []
                  color:
                    - 0
                    - 0
                    - 255
                  priority: 50
                  origin: My Fancy App
                summary: '1'
                description: ' Set a blue color with indefinite duration at priority 50 for all instances'
              '2':
                value:
                  command: color
                  color:
                    - 0
                    - 255
                    - 255
                  duration: 12000
                  priority: 20
                  origin: My Fancy App
                summary: '2'
                description: Set a cyan color for 12 seconds at priority 20
              '3':
                value:
                  command: color
                  color:
                    - 255
                    - 0
                    - 0
                    - 255
                    - 0
                    - 0
                    - 0
                    - 0
                    - 255
                  duration: 12000
                  priority: 20
                  origin: My Fancy App
                summary: '3'
                description: >-
                  Provide a color pattern, which will be repeated until all LEDs
                  have a color

                  One LED has 3 values (Red,Green,Blue) with range of 0-255

                  In this case LED 1: Red, LED 2: Red, LED 3: Blue.
      responses:
        '200':
          x-apidog-name: Success
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  command:
                    type: string
                    description: The command executed
                  subcommand:
                    type: string
                    description: The sub-command executed
                  success:
                    type: boolean
                    description: Result, if the request excuted successfully
                  info:
                    type: object
                    properties: {}
                    x-apidog-orders: []
                    description: Information requested
                    additionalProperties: true
                    x-apidog-ignore-properties: []
                  error:
                    type: string
                    description: Reason why a request did not execute successfully
                  errorData:
                    type: array
                    items:
                      type: object
                      properties:
                        description:
                          type: string
                      x-apidog-orders:
                        - description
                      x-apidog-ignore-properties: []
                    description: Detailed error explaination
                  tan:
                    type: integer
                    description: Request's transaction number
                x-apidog-orders:
                  - 01JV5M76DZ4M3GA4AD8Y4G69AP
                x-apidog-refs:
                  01JV5M76DZ4M3GA4AD8Y4G69AP:
                    $ref: '#/components/schemas/response'
                required:
                  - command
                  - success
                  - tan
                x-apidog-ignore-properties:
                  - command
                  - subcommand
                  - success
                  - info
                  - error
                  - errorData
                  - tan
              examples:
                '1':
                  summary: Success
                  value:
                    command: color
                    success: true
                    tan: 4711
                '2':
                  summary: Exception
                  value:
                    command: color
                    error: Invalid params
                    errorData:
                      - description: >-
                          JSON parse error @(JsonRpc@::1) -  [root].priority:
                          value is too large (maximum=253)
                    success: false
                    tan: 4711
          headers: {}
      security:
        - bearer: []
      x-apidog-folder: Hyperion API/Controls/Input Controls
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/894413/apis/api-17009776-run
components:
  schemas:
    instance - single:
      type: integer
      minimum: 0
      maximum: 254
      description: Instance index (0-254) to which the command applies.
      x-apidog-folder: ''
    tan:
      type: object
      properties:
        tan:
          type: integer
          minimum: 0
          examples:
            - 4711
          description: Transaction number for tracking requests and responses.
      x-apidog-orders:
        - tan
      title: tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    priorityParameters:
      type: object
      properties:
        priority:
          type: integer
          minimum: 1
          maximum: 253
          description: >-
            The priority of this input (1-253). Lower values override higher
            ones.
        origin:
          type: string
          minLength: 4
          maxLength: 20
          description: Origin string (4-20 characters), e.g., the application name.
        duration:
          type: integer
          examples:
            - -1
          minimum: -1
          description: >-
            Duration in milliseconds to keep this input. Use -1 for indefinite
            duration.
      x-apidog-orders:
        - priority
        - origin
        - duration
      required:
        - priority
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    instance - multiple:
      type: object
      properties:
        instance:
          type: array
          items: *ref_0
          uniqueItems: true
          description: >-
            List of instance indices (0-254) to which the command applies. An
            empty array applies a command to all instances.
      x-apidog-orders:
        - instance
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    response:
      type: object
      properties:
        command:
          type: string
          description: The command executed
        subcommand:
          type: string
          description: The sub-command executed
        success:
          type: boolean
          description: Result, if the request excuted successfully
        info:
          type: object
          properties: {}
          x-apidog-orders: []
          description: Information requested
          additionalProperties: true
          x-apidog-ignore-properties: []
        error:
          type: string
          description: Reason why a request did not execute successfully
        errorData:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
            x-apidog-orders:
              - description
            x-apidog-ignore-properties: []
          description: Detailed error explaination
        tan:
          type: integer
          description: Request's transaction number
      required:
        - command
        - success
        - tan
      x-apidog-orders:
        - command
        - subcommand
        - success
        - info
        - error
        - errorData
        - tan
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: http://{{host}}:8090
    description: Develop Env
  - url: https://{{host}}:8092
    description: Testing Env
security: []

```
