diff --git a/EZAudio/EZAudioUtilities.m b/EZAudio/EZAudioUtilities.m index 82402dad..a17fdec4 100644 --- a/EZAudio/EZAudioUtilities.m +++ b/EZAudio/EZAudioUtilities.m @@ -622,6 +622,17 @@ + (void)getColorComponentsFromCGColor:(CGColorRef)color *blue = components[2]; *alpha = components[3]; } + else if (componentCount == 2) + { + const CGFloat *components = CGColorGetComponents(color); + *red = components[0]; + *green = components[0]; + *blue = components[0]; + *alpha = components[1]; + } + else { + // should throw an exception maybe + } } //------------------------------------------------------------------------------