Taxonomy Parameters in WP Query to get posts from two different taxonomies

terms parameter of tax query is required. Just pass to it all the terms for taxonomy

$args = array(
    'post_type' => 'cars',
    'tax_query' => array(
        'relation' => 'OR',
        array(
            'taxonomy' => 'brand',
            'field' => 'slug',
            'terms' => 'bmw'
        ),
        array(
            'taxonomy' => 'color',
            'field' => 'id',
            'terms' => get_terms('color', array('fields'=>'ids') )
        )
    )
);

Note this query will also returns ‘cars’ that have no brand attached, but have a color.

error code: 523