Rezi
    Preparing search index...

    Function rgbTo256

    • Map an RGB color to the nearest 256-color palette index.

      Used for Tier A color fallback. Implements the standard xterm-256 color cube mapping with grayscale ramp.

      Parameters

      • r: number

        Red component (0-255)

      • g: number

        Green component (0-255)

      • b: number

        Blue component (0-255)

      Returns number

      Nearest 256-color palette index (16-255)