ColorToJson extension

ColorToJson is an extension to convert a Color to a JSON string.

on

Methods

toHex() String
toHex is an extension to convert a Color to a hex string without transparency.
toHexWithAlpha() String
toHexWithAlpha is an extension to convert a Color to a hex string with transparency.
toJson() String
toJson is an extension to convert a Color to a JSON string using toHex function.

Static Methods

fromHex(String hex) Color
fromHex is an extension to convert a Color from a hex string without transparency.
fromHexWithAlpha(String hex) Color
fromHexWithAlpha is an extension to convert a Color from a hex string with transparency.
fromJson(String json) Color
fromJson is an extension to convert a Color from a JSON string using fromHex function.