Colorizer

A plugin by ar(Trusted developer)

Colorizer
Downloads 70
Updated 5 months ago
Released 5 months ago
Created 5 months ago
Numeric ID 555
Min. Openplanet 1.26.0
Signed
Game Trackmania

Colorizer - Automatic ManiaPlanet Gradient Coloring

The "Colorizer - Dynamic Text Coloring Utility" is a plugin made for adding a gradiant color effect to sme text within an application.

NOTE: If you want to use this functionality without having to bother with exports and such, the opensource Unilicenced code can be found here: st-AR-gazer/TEMPLATE/src/Conditions/Colors.as

NOTE: For end users there exists a better solution, colorizer.xjk.yt, this can also be used without TM open.

Exports

The plugin provides several functions for external use:

  1. Colorize(const string &in str, const array<string> &in colors, _col::GradientMode type, bool useEscapeCharacters, bool flipped, bool _verbose)

    • Description: Applies a color gradient to a single text string. It offers customization options such as color selection, gradient mode, and text orientation.
    • Parameters:
      • str: The string to be colorized.
      • colors: An array of color codes, e.g., {"0033CC", "33FFFF", "CA493A"}.
      • type: Gradient mode to apply, e.g., _col::GradientMode::linear.
      • useEscapeCharacters: Whether to include escape characters in the output.
      • flipped: Whether to reverse the color gradient.
      • _verbose: Enables detailed logging for debugging purposes. Note: The _verbose flag will not work without the custom logging function it uses, set it to false.
    • Return Type: string
    • Example: Colorize("Hello, world!", {"0033CC", "33FFFF", "CA493A"}, _col::GradientMode::linear)
  2. Colorize(const array<string> &in strs, const array<string> &in colors, _col::GradientMode type, bool useEscapeCharacters, bool flipped, bool _verbose)

    • Description: Similar to the single string function, this version applies a color gradient across an array of strings, allowing for bulk processing.
    • Parameters:
      • strs: Array of strings to colorize.
      • colors: An array of color codes.
      • type: Gradient mode to apply.
      • useEscapeCharacters: Whether to include escape characters in the output.
      • flipped: Whether to reverse the color gradient.
      • _verbose: Enables detailed logging for debugging purposes. Note: The _verbose flag will not work without the custom logging function it uses, set it to false.
    • Return Type: string
    • Example: Colorize({"First", "Second"}, {"0033CC", "33FFFF"}, _col::GradientMode::linear, true, true, true)
  3. HideColorizerUI(bool t_neo)

    • Description: Toggles the visibility of the Colorizer user interface within the host application, allowing developers to streamline the UI based on user interaction.
    • Parameters:
      • t_neo: Boolean to control UI visibility, true hides the UI, false shows it.
    • Return Type: void

UI Features

  • Dynamic UI: The plugin includes a user interface that enables real-time previews of text colorization.
  • Clipboard Support: Allows users to copy colorized text directly to the clipboard for use in other applications.
  • Extensive Customization: Supports a wide range of gradient modes including linear, exponential, and more exotic types like elastic and bounce, providing versatile visual effects.