factory RGBA.fromJson(Map<String, dynamic> json) { return RGBA( r: json['r'] as int, g: json['g'] as int, b: json['b'] as int, a: json.containsKey('a') ? json['a'] as num : null, ); }