You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/20 16:25:34 UTC

[GitHub] [airflow] pierrejeambrun commented on issue #16432: Colour options for tags on DAGS

pierrejeambrun commented on issue #16432:
URL: https://github.com/apache/airflow/issues/16432#issuecomment-1252599194

   I had a similar issue one time and we tried generating random colors based on the tag values. Sort of a hash function from string to hex color space. This was giving poor color choices, often with low contrasts and ended up using a predefined color palette.
   
   I am also in favor of a palette handled outside of dag files. We could get some inspiration from the color palette available in Chakra [here](https://chakra-ui.com/docs/styled-system/theme). Which is what we use in the react part of the UI. (We could also redefine our own palette with the tools specified there if needed)
   
   I like the idea of having a way to override the default palette via the configuration, maybe something similar to what we do for [state colors](https://airflow.apache.org/docs/apache-airflow/stable/howto/customize-ui.html), the difference being that it wouldn't be a mapping but a list ?
   
   With the current tag style in the UI (background-color), we also might need to adapt the text-color to have correct contrast (going with a border would circumvent that, as we do for state colors)
   
   One more thing, when creating the dict that @bbovenzi mention, I thing it is important to do it in a way that adding new tags do not shift the colors of existing ones. (could be weird to have changing colors for a specific tag from one day to another)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org