rgbaString method

String rgbaString({
  1. bool withAlpha = true,
})

Color -> #00ffffff

Implementation

String rgbaString({bool withAlpha = true}) =>
    withAlpha ? '#${value.toRadixString(16).padLeft(8, '0')}'
    : '#${value.toRadixString(16).substring(2).padLeft(6, '0')}';