if your intended color is black you can reach that for both metals but there will be some differences which will become evident when finished.
another quote i found :
" While both aluminum and magnesium can be black anodized, achieving the exact same finish on both metals is not guaranteed due to inherent differences in their chemical composition, meaning the final black color might vary slightly between the two materials, even when using the same anodizing process; aluminum is generally considered the better choice for consistent black anodizing results."