API Snap · JSON Structure

Color Color Conversion Structure

Converted color representation across hex, RGB, and HSL formats

Type: object Properties: 8
API UtilitiesDeveloper ToolsQR CodesScreenshotsImage ProcessingPDF GenerationMarkdownURL MetadataHashingJWTBase64UUIDColor ConversionLorem IpsumPlaceholder Images

ColorConversion is a JSON Structure definition published by API Snap, describing 8 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

hex rgb rgbString hsl hslString rgba brightness isDark

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/api-snap/refs/heads/main/json-structure/color-color-conversion-structure.json",
  "name": "ColorConversion",
  "description": "Converted color representation across hex, RGB, and HSL formats",
  "type": "object",
  "properties": {
    "hex": {
      "type": "string",
      "example": "#ff0000"
    },
    "rgb": {
      "type": "object",
      "properties": {
        "r": {
          "type": "int32"
        },
        "g": {
          "type": "int32"
        },
        "b": {
          "type": "int32"
        }
      }
    },
    "rgbString": {
      "type": "string",
      "example": "rgb(255, 0, 0)"
    },
    "hsl": {
      "type": "object",
      "properties": {
        "h": {
          "type": "int32"
        },
        "s": {
          "type": "int32"
        },
        "l": {
          "type": "int32"
        }
      }
    },
    "hslString": {
      "type": "string",
      "example": "hsl(0, 100%, 50%)"
    },
    "rgba": {
      "type": "string",
      "example": "rgba(255, 0, 0, 1)"
    },
    "brightness": {
      "type": "int32",
      "description": "Perceived brightness (0\u2013255)."
    },
    "isDark": {
      "type": "boolean",
      "description": "True if the color is perceived as dark."
    }
  }
}