RGBirdflop API Documentation

Get Started

This API is used to generate RGB gradient text for Minecraft and is based on JSON. Useful for creating gradient text in your own code for anything Minecraft-related. The API has default values that are the same as the RGBirdflop website, which are also shown in the docs below. To generate a gradient, make a GET request to /api/v2/rgb. The API will return a JSON object with the gradient output.

Endpoints

/api/v2/rgb

POST: Generate a gradient.

GET: Equivalent to POST, but with query parameters.

Options

// The colors to use for the gradient. Must be in hex format.
colors: Color[] - see types in docs | string[] = [
  {
    "hex": "#54daf4",
    "pos": 0
  },
  {
    "hex": "#545eb6",
    "pos": 100
  }
]
// The colors to use for the text shadow gradient. Must be in hex format. Requires syncshadow to be false and color format set to JSON
shadowcolors: Color[] - see types in docs | string[] = [
  {
    "hex": "#15373D",
    "pos": 0
  },
  {
    "hex": "#15182E",
    "pos": 100
  }
]
// The amount of characters for one color step.
colorlength: number = 1
// The text to use for the gradient.
text: string = "Birdflop"
// The format to use for the color and format codes. For MiniMessage or JSON, { color: "MiniMessage" } can be used.
format: RegularFormatting | MiniMessageFormatting | JSONFormatting - see types in docs = {
  "color": "MiniMessage",
  "bold": "<b>$t</b>",
  "italic": "<i>$t</i>",
  "underline": "<u>$t</u>",
  "strikethrough": "<st>$t</st>",
  "obfuscate": "<obf>$t</obf>"
}
// The prefix or suffix to use for the text. Usually used for commands and stuff. $t will be replaced with the output text, if $t is not included, the output will not show.
prefixsuffix: string = ""
// Whether or not to trim color codes from spaces. Turn this off if you're using empty underlines or strikethroughs.
trimspaces: boolean = true
// lowercase has not been documented yet.
lowercase: boolean = false
// Whether or not to sync the text shadow with the text. If this is true, shadow colors will not be applied.
syncshadow: boolean = true
// Whether or not to bold the text.
bold: boolean = false
// Whether or not to italicize the text.
italic: boolean = false
// Whether or nots to underline the text.
underline: boolean = false
// Whether or not to strikethrough the text.
strikethrough: boolean = false
// Whether or not to obfuscate the text.
obfuscate: boolean = false

Types

type RegularFormatting = {
  // example: "&#$1$2$3$4$5$6$f$c"
  // $1 = #(r)rggbb
  // $2 = #r(r)ggbb
  // $3 = #rr(g)gbb
  // $4 = #rrg(g)bb
  // $5 = #rrgg(b)b
  // $6 = #rrggb(b)
  // $f = format tags
  // $c = character
  color: string,
  // The character to use before format tags
  char?: string = "&",
}
type MiniMessageFormatting = {
  color: "MiniMessage",
  // $t is the output text
  bold?: string = "<b>$t</b>",
  italic?: string = "<i>$t</i>",
  underline?: string = "<u>$t</u>",
  strikethrough?: string = "<st>$t</st>",
  obfuscate?: string = "<obf>$t</obf>",
}
type JSONFormatting = {
  color: "JSON",
}
type Color = {
  // example: #54daf4
  hex: string,
  // example: 50 for 50%
  pos: number,
}

Contributors

Thank you to everyone who has helped us improve our documentation!