// Generated by Lisette bindgen
// Source: image/color (Go stdlib)
// Go: 1.25.10
// Lisette: 0.2.1

/// CMYKToRGB converts a [CMYK] quadruple to an RGB triple.
pub fn CMYKToRGB(c: uint8, m: uint8, y: uint8, k: uint8) -> (uint8, uint8, uint8)

/// ModelFunc returns a [Model] that invokes f to implement the conversion.
pub fn ModelFunc(f: fn(Color) -> Color) -> Model

/// RGBToCMYK converts an RGB triple to a CMYK quadruple.
pub fn RGBToCMYK(r: uint8, g: uint8, b: uint8) -> (uint8, uint8, uint8, uint8)

/// RGBToYCbCr converts an RGB triple to a Y'CbCr triple.
pub fn RGBToYCbCr(r: uint8, g: uint8, b: uint8) -> (uint8, uint8, uint8)

/// YCbCrToRGB converts a Y'CbCr triple to an RGB triple.
pub fn YCbCrToRGB(y: uint8, cb: uint8, cr: uint8) -> (uint8, uint8, uint8)

/// Alpha represents an 8-bit alpha color.
pub struct Alpha {
  pub A: uint8,
}

/// Alpha16 represents a 16-bit alpha color.
pub struct Alpha16 {
  pub A: uint16,
}

/// CMYK represents a fully opaque CMYK color, having 8 bits for each of cyan,
/// magenta, yellow and black.
/// 
/// It is not associated with any particular color profile.
pub struct CMYK {
  pub C: uint8,
  pub M: uint8,
  pub Y: uint8,
  pub K: uint8,
}

/// Color can convert itself to alpha-premultiplied 16-bits per channel RGBA.
/// The conversion may be lossy.
pub interface Color {
  fn RGBA() -> (uint32, uint32, uint32, uint32)
}

/// Gray represents an 8-bit grayscale color.
pub struct Gray {
  pub Y: uint8,
}

/// Gray16 represents a 16-bit grayscale color.
pub struct Gray16 {
  pub Y: uint16,
}

/// Model can convert any [Color] to one from its own color model. The conversion
/// may be lossy.
pub interface Model {
  fn Convert(c: Color) -> Option<Color>
}

/// NRGBA represents a non-alpha-premultiplied 32-bit color.
pub struct NRGBA {
  pub R: uint8,
  pub G: uint8,
  pub B: uint8,
  pub A: uint8,
}

/// NRGBA64 represents a non-alpha-premultiplied 64-bit color,
/// having 16 bits for each of red, green, blue and alpha.
pub struct NRGBA64 {
  pub R: uint16,
  pub G: uint16,
  pub B: uint16,
  pub A: uint16,
}

/// NYCbCrA represents a non-alpha-premultiplied Y'CbCr-with-alpha color, having
/// 8 bits each for one luma, two chroma and one alpha component.
pub struct NYCbCrA {
  pub YCbCr: YCbCr,
  pub A: uint8,
}

/// Palette is a palette of colors.
pub struct Palette(Slice<Color>)

/// RGBA represents a traditional 32-bit alpha-premultiplied color, having 8
/// bits for each of red, green, blue and alpha.
/// 
/// An alpha-premultiplied color component C has been scaled by alpha (A), so
/// has valid values 0 <= C <= A.
pub struct RGBA {
  pub R: uint8,
  pub G: uint8,
  pub B: uint8,
  pub A: uint8,
}

/// RGBA64 represents a 64-bit alpha-premultiplied color, having 16 bits for
/// each of red, green, blue and alpha.
/// 
/// An alpha-premultiplied color component C has been scaled by alpha (A), so
/// has valid values 0 <= C <= A.
pub struct RGBA64 {
  pub R: uint16,
  pub G: uint16,
  pub B: uint16,
  pub A: uint16,
}

/// YCbCr represents a fully opaque 24-bit Y'CbCr color, having 8 bits each for
/// one luma and two chroma components.
/// 
/// JPEG, VP8, the MPEG family and other codecs use this color model. Such
/// codecs often use the terms YUV and Y'CbCr interchangeably, but strictly
/// speaking, the term YUV applies only to analog video signals, and Y' (luma)
/// is Y (luminance) after applying gamma correction.
/// 
/// Conversion between RGB and Y'CbCr is lossy and there are multiple, slightly
/// different formulae for converting between the two. This package follows
/// the JFIF specification at https://www.w3.org/Graphics/JPEG/jfif3.pdf.
pub struct YCbCr {
  pub Y: uint8,
  pub Cb: uint8,
  pub Cr: uint8,
}

pub var Alpha16Model: Model

pub var AlphaModel: Model

/// Standard colors.
pub var Black: Gray16

pub var CMYKModel: Model

pub var Gray16Model: Model

pub var GrayModel: Model

pub var NRGBA64Model: Model

pub var NRGBAModel: Model

pub var NYCbCrAModel: Model

/// Standard colors.
pub var Opaque: Alpha16

pub var RGBA64Model: Model

pub var RGBAModel: Model

/// Standard colors.
pub var Transparent: Alpha16

/// Standard colors.
pub var White: Gray16

pub var YCbCrModel: Model

impl Alpha {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl Alpha16 {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl CMYK {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl Gray {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl Gray16 {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl NRGBA {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl NRGBA64 {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl NYCbCrA {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl Palette {
  /// Convert returns the palette color closest to c in Euclidean R,G,B space.
  fn Convert(self, c: Color) -> Option<Color>

  /// Index returns the index of the palette color closest to c in Euclidean
  /// R,G,B,A space.
  fn Index(self, c: Color) -> int
}

impl RGBA {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl RGBA64 {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}

impl YCbCr {
  fn RGBA(self) -> (uint32, uint32, uint32, uint32)
}
