The trick is to fool the eye. It is virtually impossible to match the color 100% and as said over time it will change hue. To fool the eye, the secret is to blend. To blend you apply a larger area of gel coat a little proud of the surface, then sand with fairly fine paper applying a bit more pressure towards the outer edges. As gel coat gets sanded and gets thin, becomes more and more translucent. That makes an color differences spread out as the hue changes as opposed to a 'hard' line between the original gel and the new. Our eyes are not so good at recognizing a gradual hue change as they are for a straight edge line. If you fill a small spider crack with gel coat or other patching epoxy without feathering, slight color differences will be more easily noticed,
Note that for deeper cracks or gel coat repairs, gel coat would be applied in multiple layers. To do so, you have to use laminating gel coat or non-waxed gel coat for multiple layers to stick to each other. The final coat has to be coated with something like PVA to enable curing.
The method above applies to gel coat and not epoxy pastes or fillers