Make sure you know exactly which color of the sprite it is you wish to change as well. Click on Settings from the menu bar, then click on Palette. Or, just press F4, either way. Each box in this window represents a color the game uses for certain sprites, etc. Yes, there will be multiples of many different colors.
Some sprites even share colors.
Don't worry about that. Just look at your window and try to imagine it as being 8 sets of 2x2 rectangles. Now you need to prepare your table file. But where you need to be looking at is the number located on the colored square itself, NOT the number in the window's title. As an example, let's look at how SMB1's pattern table looks after jotting it down in the manner above.