On this page

britzl/defold-richtext/richtext.color

Rich-text rendering for Defold: styled spans, embedded tags, and per-color text runs.

  • GitHub: britzl/defold-richtext — pinned to 2fe3aed
    1. Pick a release from britzl/defold-richtext releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as color from "richtext.color"

Functions

add(name: string, color: number | string)

Parameters

  • name: string
  • color: number | string

Variables

COLORS: { aqua: Vector4; black: Vector4; blue: Vector4; brown: Vector4; cyan: Vector4; darkblue: Vector4; fuchsia: Vector4; green: Vector4; grey: Vector4; lightblue: Vector4; lime: Vector4; magenta: Vector4; maroon: Vector4; navy: Vector4; olive: Vector4; orange: Vector4; purple: Vector4; red: Vector4; silver: Vector4; teal: Vector4; white: Vector4; yellow: Vector4; }