Colour LEDs construction
Filters work by removing things.  To work like you want, you would need an LED that emits all colors.  That would be a white LED. You would then use a filter to only pass the color you want to see.

That is inefficient because you are throwing away most of the produced light.

It is also a problem because LEDs only emit a single color.

There are no white LEDs.  All LEDs emit a single color that is dictated by the semiconductor material.

Most of the white light emitting LEDs you see use blue LEDs and a phosphor that glows in other colors when illuminated with blue light.

The other way to make white light LEDs is to combine a red, a green, and a blue LED in one chip and light them in proportion to make white.

In any case, you can't filter the light from a simple LED.  All simple LEDs emit one color, and if you filter it out you get nothing.