cannot set custom colors for pie charts
问题 I am using iOS charts to make a pie chart, and I cannot figure out how to set the colors as custom colors with RGBA values. here is the code var colors: [UIColor] = [] colors.append(UIColor.init(red: 206, green: 173, blue: 128, alpha: 1)) colors.append(UIColor.init(red: 136, green: 169, blue: 132, alpha: 1)) colors.append(UIColor.init(red: 183, green: 73, blue: 32, alpha: 1)) colors.append(UIColor.init(red: 106, green: 152, blue: 150, alpha: 1)) colors.append(UIColor.init(red: 226, green: 120