@dragonspark/chroma-kit
    Preparing search index...

    Function rgbToCSSString

    • Converts an RGB color object to a CSS-compatible string representation.

      For fully opaque colors, this function returns a hex format by default as it's more compact. For colors with alpha < 1 or when forceFullString is true, it returns the rgba() format.

      Parameters

      • color: RGBColor

        The RGB color object to convert

      • OptionalforceFullString: boolean = false

        Whether to force the rgba() format even for fully opaque colors

      Returns string

      The CSS-compatible string representation