# social.colibri.labeler.service

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.labeler.service)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.labeler.service/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.labeler.service/examples)

## Definitions

### `social.colibri.labeler.service`

**Type**: `record`

Declares that this account operates a Colibri labeler and describes the badges it issues. The Colibri equivalent of `app.bsky.labeler.service`. Labels themselves stay standard `com.atproto.label` labels, served from the `#atproto_labeler` service endpoint in this account's DID document.

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `$type` | `string` (nsid) | No | The type of the record. |
| `createdAt` | `string` (datetime) | Yes |  |
| `badgeDefinitions` | `array` | Yes | Every badge this labeler can issue. A label value absent from this list is not a recognised badge. |

### `social.colibri.labeler.service#badgeAppearance`

**Type**: `object`

Colours for a single badge. Every colour is a `#rrggbb` or `#rrggbbaa` hex literal so clients can render it without interpreting arbitrary CSS.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `colors` | `array` | Yes | Badge colours, each a `#rrggbb` or `#rrggbbaa` hex literal. `solid` uses only the first entry. |
| `variant` | `string` | No | How `colors` is applied. `solid` fills the badge with the first colour. `gradientBorder` renders every colour as a stop in a gradient border over a darkened gradient fill. Defaults to `solid`. |
| `foreground` | `string` | Yes | Text colour, a `#rrggbb` or `#rrggbbaa` hex literal. |

### `social.colibri.labeler.service#badgeDefinition`

**Type**: `object`

Metadata for a single badge. `identifier` is the `val` carried by the corresponding label.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Short display name shown on the badge itself. |
| `appearance` | `ref` → `lex:social.colibri.labeler.service#badgeAppearance` | No | How the badge is coloured. Clients fall back to a neutral style when this is absent or unrecognised. |
| `identifier` | `string` | Yes | The label value, lowercase kebab-case, as it appears in `com.atproto.label` records. |
| `precedence` | `integer` | No | Sort order when a user holds several badges. Lower sorts first, so the lowest value is the default primary badge. |
| `description` | `string` | Yes | What holding this badge means. |

## Raw Schema

```json
{
  "id": "social.colibri.labeler.service",
  "defs": {
    "main": {
      "key": "literal:self",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "badgeDefinitions",
          "createdAt"
        ],
        "properties": {
          "$type": {
            "type": "string",
            "format": "nsid",
            "description": "The type of the record."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "badgeDefinitions": {
            "type": "array",
            "items": {
              "ref": "lex:social.colibri.labeler.service#badgeDefinition",
              "type": "ref"
            },
            "maxLength": 100,
            "description": "Every badge this labeler can issue. A label value absent from this list is not a recognised badge."
          }
        }
      },
      "description": "Declares that this account operates a Colibri labeler and describes the badges it issues. The Colibri equivalent of `app.bsky.labeler.service`. Labels themselves stay standard `com.atproto.label` labels, served from the `#atproto_labeler` service endpoint in this account's DID document."
    },
    "badgeAppearance": {
      "type": "object",
      "required": [
        "colors",
        "foreground"
      ],
      "properties": {
        "colors": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 9,
            "minLength": 7
          },
          "maxLength": 6,
          "minLength": 1,
          "description": "Badge colours, each a `#rrggbb` or `#rrggbbaa` hex literal. `solid` uses only the first entry."
        },
        "variant": {
          "type": "string",
          "maxLength": 32,
          "description": "How `colors` is applied. `solid` fills the badge with the first colour. `gradientBorder` renders every colour as a stop in a gradient border over a darkened gradient fill. Defaults to `solid`.",
          "knownValues": [
            "solid",
            "gradientBorder"
          ]
        },
        "foreground": {
          "type": "string",
          "maxLength": 9,
          "minLength": 7,
          "description": "Text colour, a `#rrggbb` or `#rrggbbaa` hex literal."
        }
      },
      "description": "Colours for a single badge. Every colour is a `#rrggbb` or `#rrggbbaa` hex literal so clients can render it without interpreting arbitrary CSS."
    },
    "badgeDefinition": {
      "type": "object",
      "required": [
        "identifier",
        "name",
        "description"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 64,
          "description": "Short display name shown on the badge itself."
        },
        "appearance": {
          "ref": "lex:social.colibri.labeler.service#badgeAppearance",
          "type": "ref",
          "description": "How the badge is coloured. Clients fall back to a neutral style when this is absent or unrecognised."
        },
        "identifier": {
          "type": "string",
          "maxLength": 100,
          "description": "The label value, lowercase kebab-case, as it appears in `com.atproto.label` records."
        },
        "precedence": {
          "type": "integer",
          "minimum": 0,
          "description": "Sort order when a user holds several badges. Lower sorts first, so the lowest value is the default primary badge."
        },
        "description": {
          "type": "string",
          "maxLength": 512,
          "description": "What holding this badge means."
        }
      },
      "description": "Metadata for a single badge. `identifier` is the `val` carried by the corresponding label."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 2
}
```
