How to use Texture2D as lookup table in HLSL?

I have following client-code:

   protected override void LoadContent()
        var colorMap = new Texture2D(GraphicsDevice, 10, 10, false, SurfaceFormat.Color);
        Color[] arr = new Color[100];
        for (int i = 0; i < arr.Length; i++)
            arr[i] = Color.Blue;

I then “upload” this texture2d-object to the graphics card:

            _spriteBatch.Begin(effect: mEffect);
            _spriteBatch.Draw(mBackbuffer, new Vector2(0, 0), Color.Red);

My hlsl-shader looks like this:

Texture2D colorMap;

float4 MainPS(VertexShaderOutput input) : COLOR
	float4 color = colorMap[uint2(0, 0)];
	return float4(, 1);

What I try to do is access the set pixels of the texure2d like a 2d-array, in order to do this I use the []-Operator of the Texture2D object, but for some reason I dont get any results at all, what am I doing wrong?

I use ps_5_0

Best regards

Update: My guess is that there is some kind of problem with sprite-effects, i.e. they dont accept textures beside these passed by .Draw(…) calls. If I pass the texture over .Draw(…) it works - is this a bug, or wanted?