Q:

Airflow - Change the default ui_color

There is a way to change the default ui_color for an airflow operator?
The only way I found is to write my own operator and inherit from the specific airflow operator, But it's too complicated for this simple change.
I dont know why, but the default colors are very similar, look at my own spark wrapper against the default python/kube/bash operators
Example image
thanks!

A:

You can overwrite the value after importing the module, like below. You could then define you colorset once and apply import it to all your DAGs for instance:
from airflow.operators.oracle_operator import OracleOperator
OracleOperator.ui_color = '#0000FF'
### your DAG code below

