Skip to content

Color Class

By default, the classes generated by DTL get a random color.

This layer (color_class) used for coloring classes as you wish. Add this class at the end of graph, before data saving.

    "action": "color_class",
    "src": ["$sample1"],
    "dst": "$sample2",
    "settings": {
      "classes_color_mapping": {
        "sky": "#9090CC",
        "grass": "#00AA00",
        "stop": "#FF8080"


  • classes_color_mapping — dict where keys are existing classes, and values are new colors of classes in HEX format.

Hex color

Hex color format present as string with 4 components: # + RED + GREEN + BLUE. Use online color converters to more accurately achieve the desired color.