ColorType

public enum ColorType : UInt32

Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, Red Green and Blue (RGB), or Alpha, Red, Green and Blue (ARGB)

  • If set, encoding format and size is unknown.

    Declaration

    Swift

    case unknown = 0
  • Stores 8-bit byte pixel encoding that represents transparency. Value of zero is completely transparent; a value of 255 is completely opaque.

    Declaration

    Swift

    case alpha8
  • Stores 16-bit word pixel encoding that contains five bits of blue, six bits of green, and five bits of red.

    Declaration

    Swift

    case rgb565
  • Stores 16-bit word pixel encoding that contains four bits of alpha, four bits of blue, four bits of green, and four bits of red.

    Declaration

    Swift

    case argb4444
  • Stores 32-bit word pixel encoding that contains eight bits of red, eight bits of green, eight bits of blue, and eight bits of alpha.

    Declaration

    Swift

    case rgba8888
  • Stores 32-bit word pixel encoding that contains eight bits of red, eight bits of green, eight bits of blue, and eight unused bits.

    Declaration

    Swift

    case rgb888x
  • Stores 32-bit word pixel encoding that contains eight bits of blue, eight bits of green, eight bits of red, and eight bits of alpha.

    Declaration

    Swift

    case bgra8888
  • Stores 32-bit word pixel encoding that contains ten bits of red, ten bits of green, ten bits of blue, and two bits of alpha.

    Declaration

    Swift

    case rgba1010102
  • Stores 32-bit word pixel encoding that contains ten bits of red, ten bits of green, ten bits of blue, and two unused bits.

    Declaration

    Swift

    case rgb101010x
  • Stores 8-bit byte pixel encoding that equivalent to equal values for red, blue, and green, representing colors from black to white.

    Declaration

    Swift

    case gray8
  • Stores 64-bit word pixel encoding that contains 16 bits of blue, 16 bits of green, 16 bits of red, and 16 bits of alpha. Each component is encoded as a half float.

    Declaration

    Swift

    case rgbaF16