Class ColorBuilder
Namespace: Aspose.Svg.Builder
Assembly: Aspose.SVG.dll (25.5.0)
A builder class for constructing color values in various formats. This class provides methods to set color values and build them into string representations that can be used in styling contexts, such as CSS or SVG attributes.
[ComVisible(true)]
public class ColorBuilder
Inheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
ColorBuilder()
public ColorBuilder()
Methods
Build()
Builds the current color value into a string representation.
public string Build()
Returns
A string representing the color.
Color(Color)
Sets the color value based on a Color object.
public ColorBuilder Color(Color colorValue)
Parameters
colorValue
Color
The Color object to set the color to.
Returns
The current instance of ColorBuilder for method chaining.
Current()
Sets the color value to ‘currentColor’, a CSS keyword that represents the current color context.
public ColorBuilder Current()
Returns
The current instance of ColorBuilder for method chaining.