The parser has the problem with usage of "
, because it is not possible what is for PHP or for the syntax to echo.
So change them like.
$post_category = get_the_category()['0']->term_id;
if ($post_category == 75) {
echo '<meta name="theme-color" content="#B7E0D2">';
} else {
echo'<meta name="theme-color" content="#000000">';
}
In the context of your hint to see only the White Screen, read about debugging in WordPress. If you active them you get information about the problem and that helps you to solve them easier.
To your additional question about statement for the category check. If you have always a different color (string) so works that. Maybe you should use the switch
/case
possibility. It is more readable.
You should also work in strict mode. You verify an integer value. So set this as type, like $post_category = (int) get_the_category()['0']->term_id;
. Also, the strict mode for the comparison ===
instead of ==
.