Add-On Documentation
  • Preparing search index...
  • The search index is not available
8Crafter's Server Utilities API
  • 8Crafter's Server Utilities API
  • Globals
  • modules
  • colorCore
  • createSequentialScale

Function createSequentialScale

  • createSequentialScale(options: SequentialScaleOptions): SequentialScale

    Creates a sequential color scale between two colors.

    A sequential color scale is a series of colors that transition smoothly from one color to another. This is useful for representing continuous data that ranges from low to high values.

    Parameters

    • options: SequentialScaleOptions

      The options for creating the sequential scale.

    Returns SequentialScale

    A SequentialScale (array of Color objects) representing the sequential scale.

    Example

    const scale = createSequentialScale({
    startColor: new Color('#ff0000'),
    endColor: new Color('#0000ff'),
    steps: 5
    });
    // Returns: [Color('#ff0000'), Color('#bf003f'), Color('#7f007f'), Color('#3f00bf'), Color('#0000ff')]

    Throws

    If steps is less than 2.

    • Defined in ../../../../AppData/Roaming/.minecraft_bedrock/installations/Main Release/packageData/development_behavior_packs/DebugSticksAndScreens/node_modules/color-core/dist/scales/components/sequential-scale.d.ts:22

Settings

Member Visibility
Add-On Documentation
8Crafter's Server Utilities API
  • Loading...

Generated using TypeDoc