# Take off {} using Position []

 subIDs = {"AK6", "CF11", "CL4", "FC21", "MK5"};

subColors = {LightOrange, LightBlue, LightYellow, LightGreen, LightRed}

Graphics[{subColors[[Flatten@Position[subIDs, #, 3]]],Rectangle[]}]&/@subIDs


How could i avoid the output of position to be 1 for example instead of {1} which seems to be my problem.

-

You can add a parameter to Position so it returns only one result and apply First or Partas needed

subIDs = {"AK6", "CF11", "CL4", "FC21", "MK5"};

subColors = {LightOrange, LightBlue, LightYellow, LightGreen, LightRed}

Graphics[{subColors[[Position[subIDs, #, 3, 1][[1, 1]]]],
Rectangle[]}] & /@ subIDs


Furthermore, you could also use Extract that's more suited to Position's output

subIDs = {"AK6", "CF11", "CL4", "FC21", "MK5"};

subColors = {LightOrange, LightBlue, LightYellow, LightGreen, LightRed}

Graphics[{First@Extract[subColors, Position[subIDs, #, 3, 1]],
Rectangle[]}] & /@ subIDs

-

Others have shown you better ways to solve your example problem. Just in case your example was just made up to learn how to do what your title says I think Sequence is what you are after:

Graphics[{
subColors[[Sequence @@ Flatten@Position[subIDs, #, 3]]],Rectangle[]
}] & /@ subIDs


@@ is the short form of Apply which lets you exchange the head of an expression.

-

Why not

  Graphics[{#, Rectangle[]}] & /@ subColors


Or, perhaps, more generally,

  GraphicsRow@MapThread[Graphics[{#1, Rectangle[], Black,
Inset[Text@#2, {.5, .5}]}] &,  {subColors, subIDs}]


to get

-

Does it have to be Position? To solve your example problem, a pattern-based solution may be easier:

subIDs = {"AK6", "CF11", "CL4", "FC21", "MK5"};
subColors = {LightOrange, LightBlue, LightYellow, LightGreen, LightRed};

{"AK6" -> RGBColor[1, 0.9, 0.8], "CF11" -> RGBColor[0.87, 0.94, 1], "CL4" -> RGBColor[1, 1, 0.85], "FC21" -> RGBColor[0.88, 1, 0.88], "MK5" -> RGBColor[1, 0.85, 0.85]}

Graphics[{# /. pattern, Rectangle[]}] & /@ subIDs