Hex

Static Class in Zigurous.ColorPro

Declaration

public static class Hex

Description

Functions for converting between hexadecimal and RGB color values.

Extension Methods

ToHexConverts the color to a hexadecimal integer in the RGB format (RRGGBB), e.g., 0xffff00.
ToHexRGBAConverts the color to a hexadecimal integer in the RGBA format (RRGGBBAA), e.g., 0xffff0080.
ToHexARGBConverts the color to a hexadecimal integer in the ARGB format (AARRGGBB), e.g., 0x80ffff00.
ToHexStringConverts the color to a hexadecimal string in the RGB format (RRGGBB), e.g., "#ffff00".
ToHexStringRGBAConverts the color to a hexadecimal string in the RGBA format (RRGGBBAA), e.g., "#ffff0080".
ToHexStringARGBConverts the color to a hexadecimal string in the ARGB format (AARRGGBB), e.g., "#80ffff00".

Static Methods

ToColorCreates a color from a hexadecimal integer in the RGB format (RRGGBB), e.g., 0xffff00.
ToRGBAColorCreates a color from a hexadecimal integer in the RGBA format (RRGGBBAA), e.g., 0xffff0080.
ToARGBColorCreates a color from a hexadecimal integer in the ARGB format (AARRGGBB), e.g., 0x80ffff00.
ToIntConverts a hex string to a 32-bit integer in base 16.