public static Color GetColor (this NSColor c) { nfloat r, g, b, a; c.GetRgba (out r, out g, out b, out a); return new Color ((int)(r * 255 + 0.5f), (int)(g * 255 + 0.5f), (int)(b * 255 + 0.5f), (int)(a * 255 + 0.5f)); } #else