> For the complete documentation index, see [llms.txt](https://fifo-docs.gitbook.io/colibri/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fifo-docs.gitbook.io/colibri/colibri-identicon/contract-addresses.md).

# Contract address identicons

## Contract addresses: Colibri extension

[SEP-33](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0033.md) defines account identicons for G-addresses. Contract-address support is a Colibri extension, not a standardized [SEP-33](/colibri/colibri-identicon/identicon.md) contract variant.

This complete script uses a checksummed C-address from SEP-23's test vectors. It generates an image locally and does not require a deployed contract:

```ts
import { generateIdenticon, Identicon } from "@colibri/identicon";

const contractAddress =
  "CA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUWDA";

// Decode the contract ID and reuse the account color/pattern algorithm.
const icon = new Identicon(contractAddress);
const svg = icon.toSvg();
const png = icon.toPng();
const src = icon.toDataUrl({ format: "svg" });

// The standalone generator also accepts C-addresses for custom renderers.
const { matrix, color } = generateIdenticon(contractAddress);
console.log(svg.length, png.length, src.slice(0, 30), matrix, color);
```

For a G-address, the input bytes are the 32-byte public key itself. For a C-address, they are the 32-byte contract ID, not the Wasm hash. Both use the same byte selection, hue, matrix and rendering code. No additional hashing or address-type marker is applied. Existing account images are unchanged.

[Package overview](/colibri/colibri-identicon/identicon.md)
