Ok. Then maybe better following code
var $board = $('.i-role-board-body');
var $card = $board.find('.i-role-card
[data-entity-id="' + currentCard.Id + '"]');
$card.find('.tau-card-header-container').css('background', color);
$card.find('a.tau-id').css('cssText', "color: #000000 !important");
$card.find('.tau-card-v2__section:first').css('background', color);