// ############################################################################### // ### M E T H O D S // ############################################################################### #region Methods /// <summary> Alloc a color from the default colormap of the display's default screen. </summary> /// <param name="colorname"> The color to alloc. <see cref="System.String"/> </param> /// <returns> The color pixel on success, or the white pixel otherwise. <see cref="X11.TColor"/> </returns> public TColor AllocColorFromDefaultColormap(string colorname) { IntPtr display = Xtlib.XtDisplay(_shell); if (display == IntPtr.Zero) { return(TColor.FallbackWhite); } TInt scrnID = X11lib.XDefaultScreen(display); return(X11lib.XAllocClosestNamedColor(display, X11lib.XDefaultColormap(display, scrnID), colorname)); }