Updated:

1. Red leather chestplate

/give @p leather_chestplate[dyed_color=16711680]
VersionSyntax
1.21.5+[dyed_color=16711680]
1.20.5 to 1.21.4[dyed_color={rgb:16711680}]
1.20.4 and earlier{display:{color:16711680}}

2. Common color numbers

ColorNumber
Red16711680
Blue255
Green65280
Yellow16776960
White16777215
Black0
Pink16738740
Purple8388736

3. Calculate any color

The number is Red x 65536 + Green x 256 + Blue, with each value from 0 to 255. Orange (255, 165, 0) is 16753920. It is the same as a hex color code such as #FFA500 converted to decimal.

4. Equip a full set

/item replace entity @p armor.head with leather_helmet[dyed_color=255]
/item replace entity @p armor.chest with leather_chestplate[dyed_color=255]
/item replace entity @p armor.legs with leather_leggings[dyed_color=255]
/item replace entity @p armor.feet with leather_boots[dyed_color=255]

See the item replace command.

5. Team colors

/execute as @a[team=red] run item replace entity @s armor.chest with leather_chestplate[dyed_color=16711680]
/execute as @a[team=blue] run item replace entity @s armor.chest with leather_chestplate[dyed_color=255]

Set up teams with the team command.

6. Horse and wolf armor

/give @s minecraft:leather_horse_armor[dyed_color=16753920]
/give @s minecraft:wolf_armor[dyed_color=255]

Leather horse armor and wolf armor take the same dyed_color. These give orange horse armor and blue wolf armor, handy for matching mounts and pets to team colors.

Troubleshooting

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.