Skip to main content
AlexC-FTNT
Staff
Staff
May 19, 2025

Technical Tip: Object color codes of firewall address object for CLI

  • May 19, 2025
  • 0 replies
  • 1344 views
Description This article provides information about the color codes for firewall address objects and what color is tied to what integer value.
Scope FortiGate.
Solution

The color codes are shown below:

  • 1 is black.
  • 2 is blue.
  • 3 is green.
  • 6 is red and so on.

 

The below can be found in the FortiGate GUI itself under the address object.

 

set-color.png

 

But, when performing bulk configuration from the CLI, it is helpful to know which color code is matching with which colors.

The following diagram shows the codes and color names that are available.

 

FMG color swatch - details.png

 

Sample CLI configuration for each color code:

 

config firewall address
    edit "COLOR-0"
        set comment "#2D2D2D,neutral-100"
        set color 0
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-1"
        set comment "#2D2D2D,neutral-100"
        set color 1
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-2"
        set comment "#2196F3,blue-500"
        set color 2
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-3"
        set comment "#4CAF50,emerald-500"
        set color 3
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-4"
        set comment "#E57373,red-300"
        set color 4
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-5"
        set comment "#EF9A9A,red-200"
        set color 5
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-6"
        set comment "#FF5722,tomato-500"
        set color 6
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-7"
        set comment "#F4511E,tomato-600"
        set color 7
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-8"
        set comment "#F4511E,orange-800"
        set color 8
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-9"
        set comment "#F57F17,yellow-900"
        set color 9
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-10"
        set comment "#FFCA28,amber-400"
        set color 10
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-11"
        set comment "#FFB300,amber-600"
        set color 11
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-12"
        set comment "#388E3C,emerald-700"
        set color 12
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-13"
        set comment "#7CB342,green-600"
        set color 13
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-14"
        set comment "#81C784,emerald-300"
        set color 14
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-15"
        set comment "#43A047,emerald-600"
        set color 15
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-16"
        set comment "#689F38,green-700"
        set color 16
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-17"
        set comment "#039BE5,sky-600"
        set color 17
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-18"
        set comment "#03A9F4,sky-500"
        set color 18
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-19"
        set comment "#2196F3,blue-500"
        set color 19
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-20"
        set comment "#7986CB,indigo-300"
        set color 20
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-21"
        set comment "#B39DDB,violet-200"
        set color 21
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-22"
        set comment "#CE93D8,purple-200"
        set color 22
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-23"
        set comment "#F48FB1,pink-200"
        set color 23
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-24"
        set comment "#F06292,pink-300"
        set color 24
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-25"
        set comment "#FE615C,red-400"
        set color 25
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-26"
        set comment "#BDBDBD,gray-400"
        set color 26
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-27"
        set comment "#949494,gray-500"
        set color 27
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-28"
        set comment "#FFA726,orange-400"
        set color 28
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-29"
        set comment "#9E9D24,lime-800"
        set color 29
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-30"
        set comment "#9FA8DA,indigo-200"
        set color 30
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-31"
        set comment "#E1BEE7,purple-100"
        set color 31
        set subnet 255.255.255.255 255.255.255.255
    next
    edit "COLOR-32"
        set comment "#A1887F,brown-300"
        set color 32
        set subnet 255.255.255.255 255.255.255.255
    next
end