formatHex8 method

  1. @override
String formatHex8()
override

Returns a hexadecimal string representing this color in RGBA space, such as #f7eaba90.

If this color is not displayable, a suitable displayable color is returned instead. For example, RGB channel values greater than 255 are clamped to 255.

Implementation

@override
String formatHex8() {
  return '#${_hex(r)}${_hex(g)}${_hex(b)}${_hex((opacity.isNaN ? 1 : opacity) * 255)}';
}