The error says you need to use an aggregation function over a group. In your case, you need to use the SUMX aggregation function with the CURRENT GROUP() option. The CURRENT GROUP determines the groups that must be added based on the current row.
Try this out:
New Table = GROUPBY (
tab1,
tab1[color],
"Group by color", SUMX ( CURRENTGROUP (), tab1[count lables] )
)