init(_:_:_:)

    Creates an opaque RGBA color.

    PNG.RGBA.swift:68
    init(_ red: T, _ green: T, _ blue: T)

    Parameters

    red

    A red value.

    green

    A green value.

    blue

    A blue value.

    The r, g, and b components will be set to red, green, and blue, respectively. The a component will be set to T.max.

    Other members in extension

    Typealiases

    Type members

    Instance members

    • var premultiplied: `Self`

      The color obtained by premultiplying the red, green, and blue components of this color with its alpha channel.

    • var straightened: `Self`

      The color obtained by straightening the red, green, and blue components of this color according to its alpha channel.

    • var va: PNG.VA<T>

      The grayscale-alpha color obtained by discarding the green and blue components of this color.

    • func premultiplied<U>(as: U.Type) -> PNG.RGBA<T>

      The color obtained by premultiplying the red, green, and blue components of this color with its alpha channel, performing the premultiplication in the given integer type.

    • func straightened<U>(as: U.Type) -> PNG.RGBA<T>

      The color obtained by straightening the red, green, and blue components of this color according to its alpha channel, performing the straightening in the given integer type.