isAnalogous method

bool isAnalogous(
  1. ColorChannel other
)

Returns whether this channel is analogous to other.

Implementation

bool isAnalogous(ColorChannel other) => switch ((name, other.name)) {
      ("red" || "x", "red" || "x") ||
      ("green" || "y", "green" || "y") ||
      ("blue" || "z", "blue" || "z") ||
      ("chroma" || "saturation", "chroma" || "saturation") ||
      ("lightness", "lightness") ||
      ("hue", "hue") =>
        true,
      _ => false
    };