parser/colors library

Functions

colorToHex(String color) String?
Decides the color format type and converts it to hexadecimal format.
hslaToHex(String hsla) String
Parses an HSLA color string to a valid hexadecimal color string.
hslToHex(String hsl) String
Parses an HSL color string to a valid hexadecimal color string.
rgbaToHex(String rgba) String
Parses an RGBA color string to a valid hexadecimal color string.
rgbToHex(String rgb) String
Parses an RGB color string to a valid hexadecimal color string.
validateAndGetColor(String colorString) String?
Validates and retrieves the color string in hexadecimal format.