Most Electric Yellows males with exhibit black ventral fins and broader black dorsal stripe. Males being somewhat larger and more aggressive, showing dominance, behaviour normally gives you a few hints. I wouldn't go by egg dummys like some literature suggests as I have had yellows holding a brood that have exhibited egg dummys. Usually behaviour suggests what is what... I go with size and behaviour. Venting them will give you more of an idea if you wanted to venture there.
With the Cobalts, females are not as rich in colour as the male, a dominant male being more of a vibrant blue and females a bit more drab. Yet some females can also have egg dummys present on the anal fin, yet the males egg dummys are usually more vibrant and defined more so, alot sex them this way. The males also end up larger and more dominant in behaviour.