Where can I find the “add_action()” inside a theme?

There can be a case that theme implements hooks via do_action("action_name") but it’s not forced to bind actual actions to it, as theme’s developers might just did it to make theme more extensible, and in fact never use it inside theme.

So you can just bind your own code via add_action("colormag_before", "your_function_name") in a child theme or plugin, and it will work.

And obviously if you want just to check if hook is used already somewhere in theme, just search through theme’s code for add_action("colormag_before" (or add_action( "colormag_before" or add_action('colormag_before' or add_action( 'colormag_before'. these are just variation with different kinds of how it can be spelled)

If you can search via regular expression it will be add_action\(\s*['"]colormag_before