You can color code cards or icons based on a column value.
This page color codes cards and icon background colors by departments. The region query uses Universal Theme Color Modifiers and selects this as column:
case when deptno = 10 then
'u-color-2'
when deptno = 20 then
'u-color-3'
when deptno = 30 then
'u-color-4'
when deptno = 40 then
'u-color-5'
end card_color
Cards CSS Classes and Icon CSS Classes use this column substitution,
&CARD_COLOR !ATTR., to get the value.