You can easily make palettes for Photoshop or Gimp containing only the NES' colors, if that's the only restriction you're worried about. However, the NES doesn't work with RGB, the PPU creates its colors by directly manipulating the composite video signal... Add that to the fact that every TV displays colors differently and the result is that everyone remembers NES games differently, and there's no definitive 100% correct NES palette for use in computer programs. There are a few palette generators (such as
this one) that allow you to tweak several parameters that affect how the the native NTSC signal is converted to RGB, so you can try creating one that you think looks correct and will work well for your game.