SpectrumColorXY

struct SpectrumColorXY

Color representation using the CIE xyY Color Space. The xy values represent the color’s chromaticity while the Y values represent its luminance.

  • Returns the field corresponding to the given field ID.

    Declaration

    Swift

    static func structField(id: UInt32) -> (any Field)?
  • The current value of the normalized chromaticity value x, as defined in the CIE xyY Color Space. x = CurrentX / 65536 (CurrentX is in the range 0 to 65279 inclusive).

    Declaration

    Swift

    let currentX: UInt32?
  • The current value of the normalized chromaticity value y, as defined in the CIE xyY Color Space.y = CurrentY / 65536 (CurrentY is in the range 0 to 65279 inclusive).

    Declaration

    Swift

    let currentY: UInt32?
  • Creates a new Struct instance using data read from the given TraitDecoder.

    Throws

    HomeError.parseError when parsing fails.

    Declaration

    Swift

    init(decoder: TraitDecoder) throws

    Parameters

    decoder

    The raw data representing this Struct.

  • Writes this Struct to the given TraitEncoder. Throws HomeError.parseError if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws