convertToHexString static method
Implementation
static String convertToHexString(int r, int g, int b, [num? a]) {
var rHex = Color._numAs2DigitHex(Color._clamp(r, 0, 255));
var gHex = Color._numAs2DigitHex(Color._clamp(g, 0, 255));
var bHex = Color._numAs2DigitHex(Color._clamp(b, 0, 255));
var aHex = (a != null)
? Color._numAs2DigitHex((Color._clamp(a, 0, 1) * 255).round())
: '';
// TODO(terry) 15.toRadixString(16) return 'F' on Dartium not f as in JS.
// bug: <http://code.google.com/p/dart/issues/detail?id=2670>
return '$aHex$rHex$gHex$bHex'.toLowerCase();
}