public static BitmapSource GetBitmap()
        {
            const int   widthheight       = 256;
            const float innerRadiusRatio2 = 0.25f;

            float mid   = (widthheight - 1) / 2f;
            float r2max = mid * mid;
            float r2min = r2max * innerRadiusRatio2;

            var wbitmap = new WriteableBitmap(widthheight, widthheight, 96, 96, PixelFormats.Bgra32, null);

            byte[] pixels = new byte[widthheight * widthheight * 4];

            // The bitmap is already by default transparent
            for (int row = 0; row < widthheight; ++row)
            {
                for (int col = 0; col < widthheight; ++col)
                {
                    var dx = col - mid;
                    var dy = row - mid;
                    var r2 = dx * dx + dy * dy;
                    if (r2 < r2min || r2 > r2max)
                    {
                        continue;
                    }

                    int idx = (row * widthheight + col) * 4;

                    // calculate angle
                    var phi = (Math.Atan2(dy, dx) / (2 * Math.PI));
                    if (phi < 0)
                    {
                        phi += 1;
                    }
                    // calculate color
                    AxoColor.FromHue((float)phi, out var red, out var green, out var blue);

                    pixels[idx + 0] = blue;  // B
                    pixels[idx + 1] = green; // G
                    pixels[idx + 2] = red;   // R
                    pixels[idx + 3] = 255;   // A
                }
            }

            // Update writeable bitmap with the colorArray to the image.
            var rect   = new Int32Rect(0, 0, widthheight, widthheight);
            int stride = 4 * widthheight;

            wbitmap.WritePixels(rect, pixels, stride, 0);

            return(wbitmap);
        }