You can find more details at Convert HEX to RGB or RGBA Color Code in C#
Last active
October 12, 2022 16:10
Convert HEX to RGB RGBA Color Code in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse HEX color from a string | |
Aspose.Svg.Drawing.Color color = Aspose.Svg.Drawing.Color.FromString("#DEB487"); | |
// Convert HEX to RGB | |
string rgbColor = color.ToRgbString(); | |
// Print the result into console | |
Console.WriteLine("RGB: " + rgbColor); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse HEX color from a string | |
Aspose.Svg.Drawing.Color color = Aspose.Svg.Drawing.Color.FromString("#DEB487"); | |
// Convert HEX to RGBA | |
String rgba = color.ToRgbaString(); | |
// Print the result into console | |
Console.WriteLine("RGBA: " + rgba); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment