Exemplo n.º 1
0
 /// <summary>
 /// Converts a color model RGB in model YDbDr.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>YDbDr structure</returns>
 public static YDbDr FromRGB(RGB rgb)
 {
     return(YDbDr.FromRGB(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Converts a color model RGB in model sRGB.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>sRGB structure</returns>
 public static sRGB FromRGB(RGB rgb)
 {
     return(FromRGB(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Corrects color saturation.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <param name="s">Saturation</param>
 /// <returns>RGB structure</returns>
 public static RGB Saturation(RGB rgb, float s)
 {
     return(Saturation(rgb.Red, rgb.Green, rgb.Blue, s));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Converts a color model RGB in model HSB.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>CMYK structure</returns>
 public static CMYK FromRGB(RGB rgb)
 {
     return(CMYK.FromRGB(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Calculates the brightness value in the standard RYY.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>float precision floating point number</returns>
 public static int RYY(RGB rgb)
 {
     return(RYY(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Calculates the brightness value in the standard HDTV.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>float precision floating point number</returns>
 public static int HDTV(RGB rgb)
 {
     return(HDTV(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Calculates the brightness value in the standard (PAL/NTC).
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>float precision floating point number</returns>
 public static float PAL(RGB rgb)
 {
     return(PAL(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Calculates the average brightness value.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>float precision floating point number</returns>
 public static int Average(RGB rgb)
 {
     return(Average(rgb.Red, rgb.Green, rgb.Blue));
 }
Exemplo n.º 9
0
 /// <summary>
 /// Converts a color model RGB in model HEX.
 /// </summary>
 /// <param name="rgb">RGB structure</param>
 /// <returns>Text as a sequence of Unicode characters</returns>
 public static string ToHEX(RGB rgb)
 {
     return(ToHEX(rgb.Red, rgb.Green, rgb.Blue));
 }