diff --git a/src/ImageSharp.Drawing/Brushes/Brushes.cs b/src/ImageSharp.Drawing/Brushes/Brushes.cs
index e8269848c..5912dbd51 100644
--- a/src/ImageSharp.Drawing/Brushes/Brushes.cs
+++ b/src/ImageSharp.Drawing/Brushes/Brushes.cs
@@ -6,7 +6,7 @@
namespace ImageSharp.Drawing.Brushes
{
///
- /// A collection of methods for creating brushes. Brushes use for painting.
+ /// A collection of methods for creating brushes. Brushes use for painting.
///
public class Brushes
{
@@ -15,7 +15,7 @@ namespace ImageSharp.Drawing.Brushes
///
/// The color.
/// A Brush
- public static SolidBrush Solid(Color color)
+ public static SolidBrush Solid(Color32 color)
=> new SolidBrush(color);
///
@@ -24,8 +24,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush Percent10(Color foreColor)
- => new PatternBrush(Brushes.Percent10(foreColor, Color.Transparent));
+ public static PatternBrush Percent10(Color32 foreColor)
+ => new PatternBrush(Brushes.Percent10(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Percent10 Hatch Pattern with
@@ -34,8 +34,8 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush Percent10(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.Percent10(foreColor, backColor));
+ public static PatternBrush Percent10(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.Percent10(foreColor, backColor));
///
/// Create as brush that will paint a Percent20 Hatch Pattern with
@@ -43,8 +43,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush Percent20(Color foreColor)
- => new PatternBrush(Brushes.Percent20(foreColor, Color.Transparent));
+ public static PatternBrush Percent20(Color32 foreColor)
+ => new PatternBrush(Brushes.Percent20(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Percent20 Hatch Pattern with
@@ -53,8 +53,8 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush Percent20(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.Percent20(foreColor, backColor));
+ public static PatternBrush Percent20(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.Percent20(foreColor, backColor));
///
/// Create as brush that will paint a Horizontal Hatch Pattern with
@@ -62,8 +62,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush Horizontal(Color foreColor)
- => new PatternBrush(Brushes.Horizontal(foreColor, Color.Transparent));
+ public static PatternBrush Horizontal(Color32 foreColor)
+ => new PatternBrush(Brushes.Horizontal(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Horizontal Hatch Pattern with
@@ -72,8 +72,8 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush Horizontal(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.Horizontal(foreColor, backColor));
+ public static PatternBrush Horizontal(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.Horizontal(foreColor, backColor));
///
/// Create as brush that will paint a Min Hatch Pattern with
@@ -81,8 +81,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush Min(Color foreColor)
- => new PatternBrush(Brushes.Min(foreColor, Color.Transparent));
+ public static PatternBrush Min(Color32 foreColor)
+ => new PatternBrush(Brushes.Min(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Min Hatch Pattern with
@@ -91,8 +91,8 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush Min(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.Min(foreColor, backColor));
+ public static PatternBrush Min(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.Min(foreColor, backColor));
///
/// Create as brush that will paint a Vertical Hatch Pattern with
@@ -100,8 +100,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush Vertical(Color foreColor)
- => new PatternBrush(Brushes.Vertical(foreColor, Color.Transparent));
+ public static PatternBrush Vertical(Color32 foreColor)
+ => new PatternBrush(Brushes.Vertical(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Vertical Hatch Pattern with
@@ -110,8 +110,8 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush Vertical(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.Vertical(foreColor, backColor));
+ public static PatternBrush Vertical(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.Vertical(foreColor, backColor));
///
/// Create as brush that will paint a Forward Diagonal Hatch Pattern with
@@ -119,8 +119,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush ForwardDiagonal(Color foreColor)
- => new PatternBrush(Brushes.ForwardDiagonal(foreColor, Color.Transparent));
+ public static PatternBrush ForwardDiagonal(Color32 foreColor)
+ => new PatternBrush(Brushes.ForwardDiagonal(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Forward Diagonal Hatch Pattern with
@@ -129,8 +129,8 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush ForwardDiagonal(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.ForwardDiagonal(foreColor, backColor));
+ public static PatternBrush ForwardDiagonal(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.ForwardDiagonal(foreColor, backColor));
///
/// Create as brush that will paint a Backward Diagonal Hatch Pattern with
@@ -138,8 +138,8 @@ namespace ImageSharp.Drawing.Brushes
///
/// Color of the foreground.
/// A Brush
- public static PatternBrush BackwardDiagonal(Color foreColor)
- => new PatternBrush(Brushes.BackwardDiagonal(foreColor, Color.Transparent));
+ public static PatternBrush BackwardDiagonal(Color32 foreColor)
+ => new PatternBrush(Brushes.BackwardDiagonal(foreColor, Color32.Transparent));
///
/// Create as brush that will paint a Backward Diagonal Hatch Pattern with
@@ -148,7 +148,7 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the foreground.
/// Color of the background.
/// A Brush
- public static PatternBrush BackwardDiagonal(Color foreColor, Color backColor)
- => new PatternBrush(Brushes.BackwardDiagonal(foreColor, backColor));
+ public static PatternBrush BackwardDiagonal(Color32 foreColor, Color32 backColor)
+ => new PatternBrush(Brushes.BackwardDiagonal(foreColor, backColor));
}
}
\ No newline at end of file
diff --git a/src/ImageSharp.Drawing/Brushes/ImageBrush.cs b/src/ImageSharp.Drawing/Brushes/ImageBrush.cs
index a7124bfe8..9ffd7e42b 100644
--- a/src/ImageSharp.Drawing/Brushes/ImageBrush.cs
+++ b/src/ImageSharp.Drawing/Brushes/ImageBrush.cs
@@ -6,15 +6,15 @@
namespace ImageSharp.Drawing.Brushes
{
///
- /// Provides an implementation of a solid brush for painting with repeating images. The brush uses for painting.
+ /// Provides an implementation of a solid brush for painting with repeating images. The brush uses for painting.
///
- public class ImageBrush : ImageBrush
+ public class ImageBrush : ImageBrush
{
///
/// Initializes a new instance of the class.
///
/// The image to paint.
- public ImageBrush(IImageBase image)
+ public ImageBrush(IImageBase image)
: base(image)
{
}
diff --git a/src/ImageSharp.Drawing/Brushes/PatternBrush.cs b/src/ImageSharp.Drawing/Brushes/PatternBrush.cs
index 5093a7df0..027029718 100644
--- a/src/ImageSharp.Drawing/Brushes/PatternBrush.cs
+++ b/src/ImageSharp.Drawing/Brushes/PatternBrush.cs
@@ -6,9 +6,9 @@
namespace ImageSharp.Drawing.Brushes
{
///
- /// Provides an implementation of a pattern brush for painting patterns. The brush use for painting.
+ /// Provides an implementation of a pattern brush for painting patterns. The brush use for painting.
///
- public class PatternBrush : PatternBrush
+ public class PatternBrush : PatternBrush
{
///
/// Initializes a new instance of the class.
@@ -16,7 +16,7 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the fore.
/// Color of the back.
/// The pattern.
- public PatternBrush(Color foreColor, Color backColor, bool[,] pattern)
+ public PatternBrush(Color32 foreColor, Color32 backColor, bool[,] pattern)
: base(foreColor, backColor, pattern)
{
}
@@ -25,7 +25,7 @@ namespace ImageSharp.Drawing.Brushes
/// Initializes a new instance of the class.
///
/// The brush.
- internal PatternBrush(PatternBrush brush)
+ internal PatternBrush(PatternBrush brush)
: base(brush)
{
}
diff --git a/src/ImageSharp.Drawing/Brushes/RecolorBrush.cs b/src/ImageSharp.Drawing/Brushes/RecolorBrush.cs
index 0452a3f01..fce052cb8 100644
--- a/src/ImageSharp.Drawing/Brushes/RecolorBrush.cs
+++ b/src/ImageSharp.Drawing/Brushes/RecolorBrush.cs
@@ -8,7 +8,7 @@ namespace ImageSharp.Drawing.Brushes
///
/// Provides an implementation of a recolor brush for painting color changes.
///
- public class RecolorBrush : RecolorBrush
+ public class RecolorBrush : RecolorBrush
{
///
/// Initializes a new instance of the class.
@@ -16,7 +16,7 @@ namespace ImageSharp.Drawing.Brushes
/// Color of the source.
/// Color of the target.
/// The threshold.
- public RecolorBrush(Color sourceColor, Color targetColor, float threshold)
+ public RecolorBrush(Color32 sourceColor, Color32 targetColor, float threshold)
: base(sourceColor, targetColor, threshold)
{
}
diff --git a/src/ImageSharp.Drawing/Brushes/SolidBrush.cs b/src/ImageSharp.Drawing/Brushes/SolidBrush.cs
index 123d8a7e3..93e2af6a4 100644
--- a/src/ImageSharp.Drawing/Brushes/SolidBrush.cs
+++ b/src/ImageSharp.Drawing/Brushes/SolidBrush.cs
@@ -6,15 +6,15 @@
namespace ImageSharp.Drawing.Brushes
{
///
- /// Provides an implementation of a solid brush for painting solid color areas. The brush uses for painting.
+ /// Provides an implementation of a solid brush for painting solid color areas. The brush uses for painting.
///
- public class SolidBrush : SolidBrush
+ public class SolidBrush : SolidBrush
{
///
/// Initializes a new instance of the class.
///
/// The color.
- public SolidBrush(Color color)
+ public SolidBrush(Color32 color)
: base(color)
{
}
diff --git a/src/ImageSharp.Drawing/Pens/Pen.cs b/src/ImageSharp.Drawing/Pens/Pen.cs
index 09fe89419..1b75c38b7 100644
--- a/src/ImageSharp.Drawing/Pens/Pen.cs
+++ b/src/ImageSharp.Drawing/Pens/Pen.cs
@@ -6,16 +6,16 @@
namespace ImageSharp.Drawing.Pens
{
///
- /// Represents a in the color space.
+ /// Represents a in the color space.
///
- public class Pen : Pen
+ public class Pen : Pen
{
///
/// Initializes a new instance of the class.
///
/// The color.
/// The width.
- public Pen(Color color, float width)
+ public Pen(Color32 color, float width)
: base(color, width)
{
}
@@ -25,7 +25,7 @@ namespace ImageSharp.Drawing.Pens
///
/// The brush.
/// The width.
- public Pen(IBrush brush, float width)
+ public Pen(IBrush brush, float width)
: base(brush, width)
{
}
@@ -36,7 +36,7 @@ namespace ImageSharp.Drawing.Pens
/// The brush.
/// The width.
/// The pattern.
- public Pen(IBrush brush, float width, float[] pattern)
+ public Pen(IBrush brush, float width, float[] pattern)
: base(brush, width, pattern)
{
}
@@ -45,7 +45,7 @@ namespace ImageSharp.Drawing.Pens
/// Initializes a new instance of the class.
///
/// The pen.
- internal Pen(Pen pen)
+ internal Pen(Pen pen)
: base(pen)
{
}
diff --git a/src/ImageSharp.Drawing/Pens/Pens.cs b/src/ImageSharp.Drawing/Pens/Pens.cs
index 039b7113f..b45695ceb 100644
--- a/src/ImageSharp.Drawing/Pens/Pens.cs
+++ b/src/ImageSharp.Drawing/Pens/Pens.cs
@@ -16,7 +16,7 @@ namespace ImageSharp.Drawing.Pens
/// The color.
/// The width.
/// The Pen
- public static Pen Solid(Color color, float width) => new Pen(color, width);
+ public static Pen Solid(Color32 color, float width) => new Pen(color, width);
///
/// Create a solid pen with out any drawing patterns
@@ -24,7 +24,7 @@ namespace ImageSharp.Drawing.Pens
/// The brush.
/// The width.
/// The Pen
- public static Pen Solid(IBrush brush, float width) => new Pen(brush, width);
+ public static Pen Solid(IBrush brush, float width) => new Pen(brush, width);
///
/// Create a pen with a 'Dash' drawing patterns
@@ -32,7 +32,7 @@ namespace ImageSharp.Drawing.Pens
/// The color.
/// The width.
/// The Pen
- public static Pen Dash(Color color, float width) => new Pen(Pens.Dash(color, width));
+ public static Pen Dash(Color32 color, float width) => new Pen(Pens.Dash(color, width));
///
/// Create a pen with a 'Dash' drawing patterns
@@ -40,7 +40,7 @@ namespace ImageSharp.Drawing.Pens
/// The brush.
/// The width.
/// The Pen
- public static Pen Dash(IBrush brush, float width) => new Pen(Pens.Dash(brush, width));
+ public static Pen Dash(IBrush brush, float width) => new Pen(Pens.Dash(brush, width));
///
/// Create a pen with a 'Dot' drawing patterns
@@ -48,7 +48,7 @@ namespace ImageSharp.Drawing.Pens
/// The color.
/// The width.
/// The Pen
- public static Pen Dot(Color color, float width) => new Pen(Pens.Dot(color, width));
+ public static Pen Dot(Color32 color, float width) => new Pen(Pens.Dot(color, width));
///
/// Create a pen with a 'Dot' drawing patterns
@@ -56,7 +56,7 @@ namespace ImageSharp.Drawing.Pens
/// The brush.
/// The width.
/// The Pen
- public static Pen Dot(IBrush brush, float width) => new Pen(Pens.Dot(brush, width));
+ public static Pen Dot(IBrush brush, float width) => new Pen(Pens.Dot(brush, width));
///
/// Create a pen with a 'Dash Dot' drawing patterns
@@ -64,7 +64,7 @@ namespace ImageSharp.Drawing.Pens
/// The color.
/// The width.
/// The Pen
- public static Pen DashDot(Color color, float width) => new Pen(Pens.DashDot(color, width));
+ public static Pen DashDot(Color32 color, float width) => new Pen(Pens.DashDot(color, width));
///
/// Create a pen with a 'Dash Dot' drawing patterns
@@ -72,7 +72,7 @@ namespace ImageSharp.Drawing.Pens
/// The brush.
/// The width.
/// The Pen
- public static Pen DashDot(IBrush brush, float width) => new Pen(Pens.DashDot(brush, width));
+ public static Pen DashDot(IBrush brush, float width) => new Pen(Pens.DashDot(brush, width));
///
/// Create a pen with a 'Dash Dot Dot' drawing patterns
@@ -80,7 +80,7 @@ namespace ImageSharp.Drawing.Pens
/// The color.
/// The width.
/// The Pen
- public static Pen DashDotDot(Color color, float width) => new Pen(Pens.DashDotDot(color, width));
+ public static Pen DashDotDot(Color32 color, float width) => new Pen(Pens.DashDotDot(color, width));
///
/// Create a pen with a 'Dash Dot Dot' drawing patterns
@@ -88,6 +88,6 @@ namespace ImageSharp.Drawing.Pens
/// The brush.
/// The width.
/// The Pen
- public static Pen DashDotDot(IBrush brush, float width) => new Pen(Pens.DashDotDot(brush, width));
+ public static Pen DashDotDot(IBrush brush, float width) => new Pen(Pens.DashDotDot(brush, width));
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Colors/Color.BulkOperations.cs b/src/ImageSharp/Colors/Color.BulkOperations.cs
index 7d3b12ea0..9101b6b23 100644
--- a/src/ImageSharp/Colors/Color.BulkOperations.cs
+++ b/src/ImageSharp/Colors/Color.BulkOperations.cs
@@ -8,17 +8,16 @@ namespace ImageSharp
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
- using System.Runtime.InteropServices;
///
/// Conains the definition of
///
- public partial struct Color
+ public partial struct Color32
{
///
- /// implementation optimized for .
+ /// implementation optimized for .
///
- internal class BulkOperations : BulkPixelOperations
+ internal class BulkOperations : BulkPixelOperations
{
///
/// SIMD optimized bulk implementation of
@@ -38,7 +37,7 @@ namespace ImageSharp
///
///
internal static unsafe void ToVector4SimdAligned(
- BufferSpan sourceColors,
+ BufferSpan sourceColors,
BufferSpan destVectors,
int count)
{
@@ -96,7 +95,7 @@ namespace ImageSharp
}
///
- internal override void ToVector4(BufferSpan sourceColors, BufferSpan destVectors, int count)
+ internal override void ToVector4(BufferSpan sourceColors, BufferSpan destVectors, int count)
{
if (count < 256 || !Vector.IsHardwareAccelerated)
{
@@ -123,7 +122,7 @@ namespace ImageSharp
}
///
- internal override unsafe void PackFromXyzBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
+ internal override unsafe void PackFromXyzBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
{
byte* source = (byte*)sourceBytes;
byte* destination = (byte*)destColors;
@@ -138,7 +137,7 @@ namespace ImageSharp
}
///
- internal override unsafe void ToXyzBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
+ internal override unsafe void ToXyzBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
{
byte* source = (byte*)sourceColors;
byte* destination = (byte*)destBytes;
@@ -155,19 +154,19 @@ namespace ImageSharp
}
///
- internal override void PackFromXyzwBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
+ internal override void PackFromXyzwBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
{
BufferSpan.Copy(sourceBytes, destColors, count);
}
///
- internal override void ToXyzwBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
+ internal override void ToXyzwBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
{
BufferSpan.Copy(sourceColors, destBytes, count);
}
///
- internal override unsafe void PackFromZyxBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
+ internal override unsafe void PackFromZyxBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
{
byte* source = (byte*)sourceBytes;
byte* destination = (byte*)destColors;
@@ -182,7 +181,7 @@ namespace ImageSharp
}
///
- internal override unsafe void ToZyxBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
+ internal override unsafe void ToZyxBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
{
byte* source = (byte*)sourceColors;
byte* destination = (byte*)destBytes;
@@ -199,7 +198,7 @@ namespace ImageSharp
}
///
- internal override unsafe void PackFromZyxwBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
+ internal override unsafe void PackFromZyxwBytes(BufferSpan sourceBytes, BufferSpan destColors, int count)
{
byte* source = (byte*)sourceBytes;
byte* destination = (byte*)destColors;
@@ -214,7 +213,7 @@ namespace ImageSharp
}
///
- internal override unsafe void ToZyxwBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
+ internal override unsafe void ToZyxwBytes(BufferSpan sourceColors, BufferSpan destBytes, int count)
{
byte* source = (byte*)sourceColors;
byte* destination = (byte*)destBytes;
@@ -232,7 +231,7 @@ namespace ImageSharp
}
///
- /// Value type to store -s unpacked into multiple -s.
+ /// Value type to store -s unpacked into multiple -s.
///
private struct UnpackedRGBA
{
@@ -245,9 +244,9 @@ namespace ImageSharp
public void Load(uint p)
{
this.r = p;
- this.g = p >> Color.GreenShift;
- this.b = p >> Color.BlueShift;
- this.a = p >> Color.AlphaShift;
+ this.g = p >> Color32.GreenShift;
+ this.b = p >> Color32.BlueShift;
+ this.a = p >> Color32.AlphaShift;
}
}
}
diff --git a/src/ImageSharp/Colors/ColorTransforms.cs b/src/ImageSharp/Colors/Color32.Transforms.cs
similarity index 82%
rename from src/ImageSharp/Colors/ColorTransforms.cs
rename to src/ImageSharp/Colors/Color32.Transforms.cs
index e392d7d98..43c947b8b 100644
--- a/src/ImageSharp/Colors/ColorTransforms.cs
+++ b/src/ImageSharp/Colors/Color32.Transforms.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
//
@@ -15,7 +15,7 @@ namespace ImageSharp
/// This struct is fully mutable. This is done (against the guidelines) for the sake of performance,
/// as it avoids the need to create new values for modification operations.
///
- public partial struct Color
+ public partial struct Color32
{
///
/// Adds the second color to the first.
@@ -23,9 +23,9 @@ namespace ImageSharp
/// The first source color.
/// The second source color.
///
- /// The .
+ /// The .
///
- public static Color operator +(Color left, Color right)
+ public static Color32 operator +(Color32 left, Color32 right)
{
Vector4 add = left.ToVector4() + right.ToVector4();
return Pack(ref add);
@@ -37,9 +37,9 @@ namespace ImageSharp
/// The first source color.
/// The second source color.
///
- /// The .
+ /// The .
///
- public static Color operator -(Color left, Color right)
+ public static Color32 operator -(Color32 left, Color32 right)
{
Vector4 sub = left.ToVector4() - right.ToVector4();
return Pack(ref sub);
@@ -51,9 +51,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Normal(Color backdrop, Color source)
+ public static Color32 Normal(Color32 backdrop, Color32 source)
{
Vector4 normal = Vector4BlendTransforms.Normal(backdrop.ToVector4(), source.ToVector4());
return Pack(ref normal);
@@ -71,9 +71,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Multiply(Color backdrop, Color source)
+ public static Color32 Multiply(Color32 backdrop, Color32 source)
{
Vector4 multiply = Vector4BlendTransforms.Multiply(backdrop.ToVector4(), source.ToVector4());
return Pack(ref multiply);
@@ -90,9 +90,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Screen(Color backdrop, Color source)
+ public static Color32 Screen(Color32 backdrop, Color32 source)
{
Vector4 subtract = Vector4BlendTransforms.Screen(backdrop.ToVector4(), source.ToVector4());
return Pack(ref subtract);
@@ -105,9 +105,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color HardLight(Color backdrop, Color source)
+ public static Color32 HardLight(Color32 backdrop, Color32 source)
{
Vector4 hardlight = Vector4BlendTransforms.HardLight(backdrop.ToVector4(), source.ToVector4());
return Pack(ref hardlight);
@@ -124,9 +124,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Overlay(Color backdrop, Color source)
+ public static Color32 Overlay(Color32 backdrop, Color32 source)
{
Vector4 overlay = Vector4BlendTransforms.Overlay(backdrop.ToVector4(), source.ToVector4());
return Pack(ref overlay);
@@ -139,9 +139,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Darken(Color backdrop, Color source)
+ public static Color32 Darken(Color32 backdrop, Color32 source)
{
Vector4 darken = Vector4BlendTransforms.Darken(backdrop.ToVector4(), source.ToVector4());
return Pack(ref darken);
@@ -154,9 +154,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Lighten(Color backdrop, Color source)
+ public static Color32 Lighten(Color32 backdrop, Color32 source)
{
Vector4 lighten = Vector4BlendTransforms.Lighten(backdrop.ToVector4(), source.ToVector4());
return Pack(ref lighten);
@@ -169,9 +169,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color SoftLight(Color backdrop, Color source)
+ public static Color32 SoftLight(Color32 backdrop, Color32 source)
{
Vector4 softlight = Vector4BlendTransforms.SoftLight(backdrop.ToVector4(), source.ToVector4());
return Pack(ref softlight);
@@ -183,9 +183,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color ColorDodge(Color backdrop, Color source)
+ public static Color32 ColorDodge(Color32 backdrop, Color32 source)
{
Vector4 dodge = Vector4BlendTransforms.Dodge(backdrop.ToVector4(), source.ToVector4());
return Pack(ref dodge);
@@ -197,9 +197,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color ColorBurn(Color backdrop, Color source)
+ public static Color32 ColorBurn(Color32 backdrop, Color32 source)
{
Vector4 burn = Vector4BlendTransforms.Burn(backdrop.ToVector4(), source.ToVector4());
return Pack(ref burn);
@@ -212,9 +212,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Difference(Color backdrop, Color source)
+ public static Color32 Difference(Color32 backdrop, Color32 source)
{
Vector4 difference = Vector4BlendTransforms.Difference(backdrop.ToVector4(), source.ToVector4());
return Pack(ref difference);
@@ -227,9 +227,9 @@ namespace ImageSharp
/// The backdrop color.
/// The source color.
///
- /// The .
+ /// The .
///
- public static Color Exclusion(Color backdrop, Color source)
+ public static Color32 Exclusion(Color32 backdrop, Color32 source)
{
Vector4 exclusion = Vector4BlendTransforms.Exclusion(backdrop.ToVector4(), source.ToVector4());
return Pack(ref exclusion);
@@ -245,11 +245,11 @@ namespace ImageSharp
/// At amount = 0, "from" is returned, at amount = 1, "to" is returned.
///
///
- /// The
+ /// The
///
- public static Color Lerp(Color from, Color to, float amount)
+ public static Color32 Lerp(Color32 from, Color32 to, float amount)
{
- return new Color(Vector4.Lerp(from.ToVector4(), to.ToVector4(), amount));
+ return new Color32(Vector4.Lerp(from.ToVector4(), to.ToVector4(), amount));
}
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/Colors/Color.cs b/src/ImageSharp/Colors/Color32.cs
similarity index 83%
rename from src/ImageSharp/Colors/Color.cs
rename to src/ImageSharp/Colors/Color32.cs
index c9d777c59..f7f1aceec 100644
--- a/src/ImageSharp/Colors/Color.cs
+++ b/src/ImageSharp/Colors/Color32.cs
@@ -18,7 +18,7 @@ namespace ImageSharp
/// as it avoids the need to create new values for modification operations.
///
[StructLayout(LayoutKind.Explicit)]
- public partial struct Color : IPixel
+ public partial struct Color32 : IPixel
{
///
/// Gets or sets the red component.
@@ -75,13 +75,13 @@ namespace ImageSharp
private static readonly Vector4 Half = new Vector4(0.5F);
///
- /// Initializes a new instance of the struct.
+ /// Initializes a new instance of the struct.
///
/// The red component.
/// The green component.
/// The blue component.
/// The alpha component.
- public Color(byte r, byte g, byte b, byte a = 255)
+ public Color32(byte r, byte g, byte b, byte a = 255)
: this()
{
this.R = r;
@@ -91,56 +91,56 @@ namespace ImageSharp
}
///
- /// Initializes a new instance of the struct.
+ /// Initializes a new instance of the struct.
///
/// The red component.
/// The green component.
/// The blue component.
/// The alpha component.
- public Color(float r, float g, float b, float a = 1)
+ public Color32(float r, float g, float b, float a = 1)
: this()
{
this = Pack(r, g, b, a);
}
///
- /// Initializes a new instance of the struct.
+ /// Initializes a new instance of the struct.
///
///
/// The vector containing the components for the packed vector.
///
- public Color(Vector3 vector)
+ public Color32(Vector3 vector)
: this()
{
this = Pack(ref vector);
}
///
- /// Initializes a new instance of the struct.
+ /// Initializes a new instance of the struct.
///
///
/// The vector containing the components for the packed vector.
///
- public Color(Vector4 vector)
+ public Color32(Vector4 vector)
: this()
{
this = Pack(ref vector);
}
///
- /// Compares two objects for equality.
+ /// Compares two objects for equality.
///
///
- /// The on the left side of the operand.
+ /// The on the left side of the operand.
///
///
- /// The on the right side of the operand.
+ /// The on the right side of the operand.
///
///
/// True if the parameter is equal to the parameter; otherwise, false.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static bool operator ==(Color left, Color right)
+ public static bool operator ==(Color32 left, Color32 right)
{
return left.R == right.R
&& left.G == right.G
@@ -149,15 +149,15 @@ namespace ImageSharp
}
///
- /// Compares two objects for equality.
+ /// Compares two objects for equality.
///
- /// The on the left side of the operand.
- /// The on the right side of the operand.
+ /// The on the left side of the operand.
+ /// The on the right side of the operand.
///
/// True if the parameter is not equal to the parameter; otherwise, false.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static bool operator !=(Color left, Color right)
+ public static bool operator !=(Color32 left, Color32 right)
{
return left.R != right.R
&& left.G != right.G
@@ -166,22 +166,22 @@ namespace ImageSharp
}
///
- /// Creates a new instance of the struct.
+ /// Creates a new instance of the struct.
///
///
/// The hexadecimal representation of the combined color components arranged
/// in rgb, rgba, rrggbb, or rrggbbaa format to match web syntax.
///
///
- /// The .
+ /// The .
///
- public static Color FromHex(string hex)
+ public static Color32 FromHex(string hex)
{
- return ColorBuilder.FromHex(hex);
+ return ColorBuilder.FromHex(hex);
}
///
- public BulkPixelOperations CreateBulkOperations() => new BulkOperations();
+ public BulkPixelOperations CreateBulkOperations() => new BulkOperations();
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -258,12 +258,12 @@ namespace ImageSharp
///
public override bool Equals(object obj)
{
- return (obj is Color) && this.Equals((Color)obj);
+ return (obj is Color32) && this.Equals((Color32)obj);
}
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public bool Equals(Color other)
+ public bool Equals(Color32 other)
{
return this.R == other.R
&& this.G == other.G
@@ -311,24 +311,24 @@ namespace ImageSharp
/// Packs a into a uint.
///
/// The vector containing the values to pack.
- /// The
+ /// The
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static Color Pack(ref Vector4 vector)
+ private static Color32 Pack(ref Vector4 vector)
{
vector *= MaxBytes;
vector += Half;
vector = Vector4.Clamp(vector, Vector4.Zero, MaxBytes);
- return new Color((byte)vector.X, (byte)vector.Y, (byte)vector.Z, (byte)vector.W);
+ return new Color32((byte)vector.X, (byte)vector.Y, (byte)vector.Z, (byte)vector.W);
}
///
/// Packs a into a uint.
///
/// The vector containing the values to pack.
- /// The
+ /// The
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static Color Pack(ref Vector3 vector)
+ private static Color32 Pack(ref Vector3 vector)
{
Vector4 value = new Vector4(vector, 1);
return Pack(ref value);
@@ -341,9 +341,9 @@ namespace ImageSharp
/// The y-component
/// The z-component
/// The w-component
- /// The
+ /// The
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static Color Pack(float x, float y, float z, float w)
+ private static Color32 Pack(float x, float y, float z, float w)
{
Vector4 value = new Vector4(x, y, z, w);
return Pack(ref value);
diff --git a/src/ImageSharp/Colors/Color32Constants.cs b/src/ImageSharp/Colors/Color32Constants.cs
new file mode 100644
index 000000000..7c88b8117
--- /dev/null
+++ b/src/ImageSharp/Colors/Color32Constants.cs
@@ -0,0 +1,179 @@
+//
+// Copyright (c) James Jackson-South and contributors.
+// Licensed under the Apache License, Version 2.0.
+//
+
+namespace ImageSharp
+{
+ using System;
+ using System.Collections.Generic;
+
+ ///
+ /// Provides useful color definitions.
+ ///
+ public static class Color32Constants
+ {
+ ///
+ /// Provides a lazy, one time method of returning the colors.
+ ///
+ private static readonly Lazy SafeColors = new Lazy(GetWebSafeColors);
+
+ ///
+ /// Gets a collection of named, web safe, colors as defined in the CSS Color Module Level 4.
+ ///
+ public static Color32[] WebSafeColors => SafeColors.Value;
+
+ ///
+ /// Returns an array of web safe colors.
+ ///
+ /// The
+ private static Color32[] GetWebSafeColors()
+ {
+ return new List
+ {
+ Color32.AliceBlue,
+ Color32.AntiqueWhite,
+ Color32.Aqua,
+ Color32.Aquamarine,
+ Color32.Azure,
+ Color32.Beige,
+ Color32.Bisque,
+ Color32.Black,
+ Color32.BlanchedAlmond,
+ Color32.Blue,
+ Color32.BlueViolet,
+ Color32.Brown,
+ Color32.BurlyWood,
+ Color32.CadetBlue,
+ Color32.Chartreuse,
+ Color32.Chocolate,
+ Color32.Coral,
+ Color32.CornflowerBlue,
+ Color32.Cornsilk,
+ Color32.Crimson,
+ Color32.Cyan,
+ Color32.DarkBlue,
+ Color32.DarkCyan,
+ Color32.DarkGoldenrod,
+ Color32.DarkGray,
+ Color32.DarkGreen,
+ Color32.DarkKhaki,
+ Color32.DarkMagenta,
+ Color32.DarkOliveGreen,
+ Color32.DarkOrange,
+ Color32.DarkOrchid,
+ Color32.DarkRed,
+ Color32.DarkSalmon,
+ Color32.DarkSeaGreen,
+ Color32.DarkSlateBlue,
+ Color32.DarkSlateGray,
+ Color32.DarkTurquoise,
+ Color32.DarkViolet,
+ Color32.DeepPink,
+ Color32.DeepSkyBlue,
+ Color32.DimGray,
+ Color32.DodgerBlue,
+ Color32.Firebrick,
+ Color32.FloralWhite,
+ Color32.ForestGreen,
+ Color32.Fuchsia,
+ Color32.Gainsboro,
+ Color32.GhostWhite,
+ Color32.Gold,
+ Color32.Goldenrod,
+ Color32.Gray,
+ Color32.Green,
+ Color32.GreenYellow,
+ Color32.Honeydew,
+ Color32.HotPink,
+ Color32.IndianRed,
+ Color32.Indigo,
+ Color32.Ivory,
+ Color32.Khaki,
+ Color32.Lavender,
+ Color32.LavenderBlush,
+ Color32.LawnGreen,
+ Color32.LemonChiffon,
+ Color32.LightBlue,
+ Color32.LightCoral,
+ Color32.LightCyan,
+ Color32.LightGoldenrodYellow,
+ Color32.LightGray,
+ Color32.LightGreen,
+ Color32.LightPink,
+ Color32.LightSalmon,
+ Color32.LightSeaGreen,
+ Color32.LightSkyBlue,
+ Color32.LightSlateGray,
+ Color32.LightSteelBlue,
+ Color32.LightYellow,
+ Color32.Lime,
+ Color32.LimeGreen,
+ Color32.Linen,
+ Color32.Magenta,
+ Color32.Maroon,
+ Color32.MediumAquamarine,
+ Color32.MediumBlue,
+ Color32.MediumOrchid,
+ Color32.MediumPurple,
+ Color32.MediumSeaGreen,
+ Color32.MediumSlateBlue,
+ Color32.MediumSpringGreen,
+ Color32.MediumTurquoise,
+ Color32.MediumVioletRed,
+ Color32.MidnightBlue,
+ Color32.MintCream,
+ Color32.MistyRose,
+ Color32.Moccasin,
+ Color32.NavajoWhite,
+ Color32.Navy,
+ Color32.OldLace,
+ Color32.Olive,
+ Color32.OliveDrab,
+ Color32.Orange,
+ Color32.OrangeRed,
+ Color32.Orchid,
+ Color32.PaleGoldenrod,
+ Color32.PaleGreen,
+ Color32.PaleTurquoise,
+ Color32.PaleVioletRed,
+ Color32.PapayaWhip,
+ Color32.PeachPuff,
+ Color32.Peru,
+ Color32.Pink,
+ Color32.Plum,
+ Color32.PowderBlue,
+ Color32.Purple,
+ Color32.RebeccaPurple,
+ Color32.Red,
+ Color32.RosyBrown,
+ Color32.RoyalBlue,
+ Color32.SaddleBrown,
+ Color32.Salmon,
+ Color32.SandyBrown,
+ Color32.SeaGreen,
+ Color32.SeaShell,
+ Color32.Sienna,
+ Color32.Silver,
+ Color32.SkyBlue,
+ Color32.SlateBlue,
+ Color32.SlateGray,
+ Color32.Snow,
+ Color32.SpringGreen,
+ Color32.SteelBlue,
+ Color32.Tan,
+ Color32.Teal,
+ Color32.Thistle,
+ Color32.Tomato,
+ Color32.Transparent,
+ Color32.Turquoise,
+ Color32.Violet,
+ Color32.Wheat,
+ Color32.White,
+ Color32.WhiteSmoke,
+ Color32.Yellow,
+ Color32.YellowGreen
+ }.ToArray();
+ }
+ }
+}
diff --git a/src/ImageSharp/Colors/Color32Definitions.cs b/src/ImageSharp/Colors/Color32Definitions.cs
new file mode 100644
index 000000000..5c361b428
--- /dev/null
+++ b/src/ImageSharp/Colors/Color32Definitions.cs
@@ -0,0 +1,728 @@
+//
+// Copyright (c) James Jackson-South and contributors.
+// Licensed under the Apache License, Version 2.0.
+//
+
+namespace ImageSharp
+{
+ ///
+ /// Packed vector type containing four 8-bit unsigned normalized values ranging from 0 to 255.
+ /// The color components are stored in red, green, blue, and alpha order.
+ ///
+ ///
+ /// This struct is fully mutable. This is done (against the guidelines) for the sake of performance,
+ /// as it avoids the need to create new values for modification operations.
+ ///
+ public partial struct Color32
+ {
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F0F8FF.
+ ///
+ public static readonly Color32 AliceBlue = NamedColors.AliceBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FAEBD7.
+ ///
+ public static readonly Color32 AntiqueWhite = NamedColors.AntiqueWhite;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00FFFF.
+ ///
+ public static readonly Color32 Aqua = NamedColors.Aqua;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #7FFFD4.
+ ///
+ public static readonly Color32 Aquamarine = NamedColors.Aquamarine;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F0FFFF.
+ ///
+ public static readonly Color32 Azure = NamedColors.Azure;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F5F5DC.
+ ///
+ public static readonly Color32 Beige = NamedColors.Beige;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFE4C4.
+ ///
+ public static readonly Color32 Bisque = NamedColors.Bisque;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #000000.
+ ///
+ public static readonly Color32 Black = NamedColors.Black;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFEBCD.
+ ///
+ public static readonly Color32 BlanchedAlmond = NamedColors.BlanchedAlmond;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #0000FF.
+ ///
+ public static readonly Color32 Blue = NamedColors.Blue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #8A2BE2.
+ ///
+ public static readonly Color32 BlueViolet = NamedColors.BlueViolet;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #A52A2A.
+ ///
+ public static readonly Color32 Brown = NamedColors.Brown;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DEB887.
+ ///
+ public static readonly Color32 BurlyWood = NamedColors.BurlyWood;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #5F9EA0.
+ ///
+ public static readonly Color32 CadetBlue = NamedColors.CadetBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #7FFF00.
+ ///
+ public static readonly Color32 Chartreuse = NamedColors.Chartreuse;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #D2691E.
+ ///
+ public static readonly Color32 Chocolate = NamedColors.Chocolate;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF7F50.
+ ///
+ public static readonly Color32 Coral = NamedColors.Coral;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #6495ED.
+ ///
+ public static readonly Color32 CornflowerBlue = NamedColors.CornflowerBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFF8DC.
+ ///
+ public static readonly Color32 Cornsilk = NamedColors.Cornsilk;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DC143C.
+ ///
+ public static readonly Color32 Crimson = NamedColors.Crimson;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00FFFF.
+ ///
+ public static readonly Color32 Cyan = NamedColors.Cyan;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00008B.
+ ///
+ public static readonly Color32 DarkBlue = NamedColors.DarkBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #008B8B.
+ ///
+ public static readonly Color32 DarkCyan = NamedColors.DarkCyan;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #B8860B.
+ ///
+ public static readonly Color32 DarkGoldenrod = NamedColors.DarkGoldenrod;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #A9A9A9.
+ ///
+ public static readonly Color32 DarkGray = NamedColors.DarkGray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #006400.
+ ///
+ public static readonly Color32 DarkGreen = NamedColors.DarkGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #BDB76B.
+ ///
+ public static readonly Color32 DarkKhaki = NamedColors.DarkKhaki;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #8B008B.
+ ///
+ public static readonly Color32 DarkMagenta = NamedColors.DarkMagenta;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #556B2F.
+ ///
+ public static readonly Color32 DarkOliveGreen = NamedColors.DarkOliveGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF8C00.
+ ///
+ public static readonly Color32 DarkOrange = NamedColors.DarkOrange;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #9932CC.
+ ///
+ public static readonly Color32 DarkOrchid = NamedColors.DarkOrchid;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #8B0000.
+ ///
+ public static readonly Color32 DarkRed = NamedColors.DarkRed;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #E9967A.
+ ///
+ public static readonly Color32 DarkSalmon = NamedColors.DarkSalmon;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #8FBC8B.
+ ///
+ public static readonly Color32 DarkSeaGreen = NamedColors.DarkSeaGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #483D8B.
+ ///
+ public static readonly Color32 DarkSlateBlue = NamedColors.DarkSlateBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #2F4F4F.
+ ///
+ public static readonly Color32 DarkSlateGray = NamedColors.DarkSlateGray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00CED1.
+ ///
+ public static readonly Color32 DarkTurquoise = NamedColors.DarkTurquoise;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #9400D3.
+ ///
+ public static readonly Color32 DarkViolet = NamedColors.DarkViolet;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF1493.
+ ///
+ public static readonly Color32 DeepPink = NamedColors.DeepPink;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00BFFF.
+ ///
+ public static readonly Color32 DeepSkyBlue = NamedColors.DeepSkyBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #696969.
+ ///
+ public static readonly Color32 DimGray = NamedColors.DimGray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #1E90FF.
+ ///
+ public static readonly Color32 DodgerBlue = NamedColors.DodgerBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #B22222.
+ ///
+ public static readonly Color32 Firebrick = NamedColors.Firebrick;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFFAF0.
+ ///
+ public static readonly Color32 FloralWhite = NamedColors.FloralWhite;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #228B22.
+ ///
+ public static readonly Color32 ForestGreen = NamedColors.ForestGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF00FF.
+ ///
+ public static readonly Color32 Fuchsia = NamedColors.Fuchsia;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DCDCDC.
+ ///
+ public static readonly Color32 Gainsboro = NamedColors.Gainsboro;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F8F8FF.
+ ///
+ public static readonly Color32 GhostWhite = NamedColors.GhostWhite;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFD700.
+ ///
+ public static readonly Color32 Gold = NamedColors.Gold;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DAA520.
+ ///
+ public static readonly Color32 Goldenrod = NamedColors.Goldenrod;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #808080.
+ ///
+ public static readonly Color32 Gray = NamedColors.Gray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #008000.
+ ///
+ public static readonly Color32 Green = NamedColors.Green;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #ADFF2F.
+ ///
+ public static readonly Color32 GreenYellow = NamedColors.GreenYellow;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F0FFF0.
+ ///
+ public static readonly Color32 Honeydew = NamedColors.Honeydew;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF69B4.
+ ///
+ public static readonly Color32 HotPink = NamedColors.HotPink;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #CD5C5C.
+ ///
+ public static readonly Color32 IndianRed = NamedColors.IndianRed;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #4B0082.
+ ///
+ public static readonly Color32 Indigo = NamedColors.Indigo;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFFFF0.
+ ///
+ public static readonly Color32 Ivory = NamedColors.Ivory;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F0E68C.
+ ///
+ public static readonly Color32 Khaki = NamedColors.Khaki;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #E6E6FA.
+ ///
+ public static readonly Color32 Lavender = NamedColors.Lavender;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFF0F5.
+ ///
+ public static readonly Color32 LavenderBlush = NamedColors.LavenderBlush;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #7CFC00.
+ ///
+ public static readonly Color32 LawnGreen = NamedColors.LawnGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFFACD.
+ ///
+ public static readonly Color32 LemonChiffon = NamedColors.LemonChiffon;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #ADD8E6.
+ ///
+ public static readonly Color32 LightBlue = NamedColors.LightBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F08080.
+ ///
+ public static readonly Color32 LightCoral = NamedColors.LightCoral;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #E0FFFF.
+ ///
+ public static readonly Color32 LightCyan = NamedColors.LightCyan;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FAFAD2.
+ ///
+ public static readonly Color32 LightGoldenrodYellow = NamedColors.LightGoldenrodYellow;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #D3D3D3.
+ ///
+ public static readonly Color32 LightGray = NamedColors.LightGray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #90EE90.
+ ///
+ public static readonly Color32 LightGreen = NamedColors.LightGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFB6C1.
+ ///
+ public static readonly Color32 LightPink = NamedColors.LightPink;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFA07A.
+ ///
+ public static readonly Color32 LightSalmon = NamedColors.LightSalmon;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #20B2AA.
+ ///
+ public static readonly Color32 LightSeaGreen = NamedColors.LightSeaGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #87CEFA.
+ ///
+ public static readonly Color32 LightSkyBlue = NamedColors.LightSkyBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #778899.
+ ///
+ public static readonly Color32 LightSlateGray = NamedColors.LightSlateGray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #B0C4DE.
+ ///
+ public static readonly Color32 LightSteelBlue = NamedColors.LightSteelBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFFFE0.
+ ///
+ public static readonly Color32 LightYellow = NamedColors.LightYellow;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00FF00.
+ ///
+ public static readonly Color32 Lime = NamedColors.Lime;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #32CD32.
+ ///
+ public static readonly Color32 LimeGreen = NamedColors.LimeGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FAF0E6.
+ ///
+ public static readonly Color32 Linen = NamedColors.Linen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF00FF.
+ ///
+ public static readonly Color32 Magenta = NamedColors.Magenta;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #800000.
+ ///
+ public static readonly Color32 Maroon = NamedColors.Maroon;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #66CDAA.
+ ///
+ public static readonly Color32 MediumAquamarine = NamedColors.MediumAquamarine;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #0000CD.
+ ///
+ public static readonly Color32 MediumBlue = NamedColors.MediumBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #BA55D3.
+ ///
+ public static readonly Color32 MediumOrchid = NamedColors.MediumOrchid;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #9370DB.
+ ///
+ public static readonly Color32 MediumPurple = NamedColors.MediumPurple;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #3CB371.
+ ///
+ public static readonly Color32 MediumSeaGreen = NamedColors.MediumSeaGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #7B68EE.
+ ///
+ public static readonly Color32 MediumSlateBlue = NamedColors.MediumSlateBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00FA9A.
+ ///
+ public static readonly Color32 MediumSpringGreen = NamedColors.MediumSpringGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #48D1CC.
+ ///
+ public static readonly Color32 MediumTurquoise = NamedColors.MediumTurquoise;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #C71585.
+ ///
+ public static readonly Color32 MediumVioletRed = NamedColors.MediumVioletRed;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #191970.
+ ///
+ public static readonly Color32 MidnightBlue = NamedColors.MidnightBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F5FFFA.
+ ///
+ public static readonly Color32 MintCream = NamedColors.MintCream;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFE4E1.
+ ///
+ public static readonly Color32 MistyRose = NamedColors.MistyRose;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFE4B5.
+ ///
+ public static readonly Color32 Moccasin = NamedColors.Moccasin;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFDEAD.
+ ///
+ public static readonly Color32 NavajoWhite = NamedColors.NavajoWhite;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #000080.
+ ///
+ public static readonly Color32 Navy = NamedColors.Navy;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FDF5E6.
+ ///
+ public static readonly Color32 OldLace = NamedColors.OldLace;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #808000.
+ ///
+ public static readonly Color32 Olive = NamedColors.Olive;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #6B8E23.
+ ///
+ public static readonly Color32 OliveDrab = NamedColors.OliveDrab;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFA500.
+ ///
+ public static readonly Color32 Orange = NamedColors.Orange;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF4500.
+ ///
+ public static readonly Color32 OrangeRed = NamedColors.OrangeRed;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DA70D6.
+ ///
+ public static readonly Color32 Orchid = NamedColors.Orchid;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #EEE8AA.
+ ///
+ public static readonly Color32 PaleGoldenrod = NamedColors.PaleGoldenrod;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #98FB98.
+ ///
+ public static readonly Color32 PaleGreen = NamedColors.PaleGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #AFEEEE.
+ ///
+ public static readonly Color32 PaleTurquoise = NamedColors.PaleTurquoise;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DB7093.
+ ///
+ public static readonly Color32 PaleVioletRed = NamedColors.PaleVioletRed;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFEFD5.
+ ///
+ public static readonly Color32 PapayaWhip = NamedColors.PapayaWhip;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFDAB9.
+ ///
+ public static readonly Color32 PeachPuff = NamedColors.PeachPuff;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #CD853F.
+ ///
+ public static readonly Color32 Peru = NamedColors.Peru;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFC0CB.
+ ///
+ public static readonly Color32 Pink = NamedColors.Pink;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #DDA0DD.
+ ///
+ public static readonly Color32 Plum = NamedColors.Plum;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #B0E0E6.
+ ///
+ public static readonly Color32 PowderBlue = NamedColors.PowderBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #800080.
+ ///
+ public static readonly Color32 Purple = NamedColors.Purple;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #663399.
+ ///
+ public static readonly Color32 RebeccaPurple = NamedColors.RebeccaPurple;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF0000.
+ ///
+ public static readonly Color32 Red = NamedColors.Red;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #BC8F8F.
+ ///
+ public static readonly Color32 RosyBrown = NamedColors.RosyBrown;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #4169E1.
+ ///
+ public static readonly Color32 RoyalBlue = NamedColors.RoyalBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #8B4513.
+ ///
+ public static readonly Color32 SaddleBrown = NamedColors.SaddleBrown;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FA8072.
+ ///
+ public static readonly Color32 Salmon = NamedColors.Salmon;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #F4A460.
+ ///
+ public static readonly Color32 SandyBrown = NamedColors.SandyBrown;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #2E8B57.
+ ///
+ public static readonly Color32 SeaGreen = NamedColors.SeaGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFF5EE.
+ ///
+ public static readonly Color32 SeaShell = NamedColors.SeaShell;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #A0522D.
+ ///
+ public static readonly Color32 Sienna = NamedColors.Sienna;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #C0C0C0.
+ ///
+ public static readonly Color32 Silver = NamedColors.Silver;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #87CEEB.
+ ///
+ public static readonly Color32 SkyBlue = NamedColors.SkyBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #6A5ACD.
+ ///
+ public static readonly Color32 SlateBlue = NamedColors.SlateBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #708090.
+ ///
+ public static readonly Color32 SlateGray = NamedColors.SlateGray;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFFAFA.
+ ///
+ public static readonly Color32 Snow = NamedColors.Snow;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #00FF7F.
+ ///
+ public static readonly Color32 SpringGreen = NamedColors.SpringGreen;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #4682B4.
+ ///
+ public static readonly Color32 SteelBlue = NamedColors.SteelBlue;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #D2B48C.
+ ///
+ public static readonly Color32 Tan = NamedColors.Tan;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #008080.
+ ///
+ public static readonly Color32 Teal = NamedColors.Teal;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #D8BFD8.
+ ///
+ public static readonly Color32 Thistle = NamedColors.Thistle;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FF6347.
+ ///
+ public static readonly Color32 Tomato = NamedColors.Tomato;
+
+ ///
+ /// Represents a matching the W3C definition that has an hex value of #FFFFFF.
+ ///
+ public static readonly Color32 Transparent = NamedColors.Transparent;
+
+ ///
+ /// Represents a