Environment variables
KUBECOLOR_OBJ_FRESH
When setting the variable KUBECOLOR_OBJ_FRESH
to a duration, you can change the color of the object depending on its creation time.
Please see Specify object fresh age threshold
KUBECOLOR_FORCE_COLORS
In addition to forcing colors with --force-colors
, you can also do so by setting the environment variable KUBECOLOR_FORCE_COLORS=auto
.
See Dynamic color support section for all possible values.
You can use this environment variable to colorize output when you invoke kubecolor in the watch
command (e.g. watch kubecolor get pods
).
Set the following alias:
Be sure to include the space at the end to enable alias expansion (without this additional space, the command watch kgp
would fail, for example).
KUBECOLOR_LIGHT_BACKGROUND
In addition to use the light color preset with --light-background
, you can also do so by setting the environment variable KUBECOLOR_LIGHT_BACKGROUND=true
.
Theme variables
Environment variable | Type | Description | Dark theme |
---|---|---|---|
KUBECOLOR_THEME_BASE_INFO | color | general color for when things are informational | white |
KUBECOLOR_THEME_BASE_PRIMARY | color | general color for when things are focus | magenta |
KUBECOLOR_THEME_BASE_SECONDARY | color | general color for when things are secondary focus | cyan |
KUBECOLOR_THEME_BASE_SUCCESS | color | general color for when things are good | green |
KUBECOLOR_THEME_BASE_WARNING | color | general color for when things are wrong | yellow |
KUBECOLOR_THEME_BASE_DANGER | color | general color for when things are bad | red |
KUBECOLOR_THEME_BASE_MUTED | color | general color for when things are less relevant | gray:italic |
KUBECOLOR_THEME_BASE_KEY | color[] | general color for keys (fallback to [KUBECOLOR_THEME_BASE_SECONDARY] ) | hicyan / cyan |
KUBECOLOR_THEME_DEFAULT | color | default when no specific mapping is found for the command | green |
KUBECOLOR_THEME_SHELL_COMMENT | color | used on comments, e.g # this is a comment (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_SHELL_COMMAND | color | used on commands, e.g kubectl or echo (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_SHELL_ARG | color | used on arguments, e.g get pods in kubectl get pods (fallback to KUBECOLOR_THEME_BASE_INFO ) | white |
KUBECOLOR_THEME_SHELL_FLAG | color | used on flags, e.g --watch in kubectl get pods --watch (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_DATA_KEY | color[] | used for the key (fallback to KUBECOLOR_THEME_BASE_KEY ) | hicyan / cyan |
KUBECOLOR_THEME_DATA_STRING | color | used when value is a string (fallback to KUBECOLOR_THEME_BASE_INFO ) | hiyellow |
KUBECOLOR_THEME_DATA_TRUE | color | used when value is true (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_DATA_FALSE | color | used when value is false (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_DATA_NUMBER | color | used when the value is a number (fallback to KUBECOLOR_THEME_BASE_PRIMARY ) | magenta |
KUBECOLOR_THEME_DATA_NULL | color | used when the value is null, nil, or none (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_DATA_QUANTITY | color | used when the value is a quantity, e.g “100m” or “5Gi” (fallback to KUBECOLOR_THEME_DATA_NUMBER ) | magenta |
KUBECOLOR_THEME_DATA_DURATION | color | used when the value is a duration, e.g “12m” or “1d12h” | |
KUBECOLOR_THEME_DATA_DURATIONFRESH | color | color used when the time value is under a certain delay (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_DATA_RATIO_ZERO | color | used for “0/0” (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_DATA_RATIO_EQUAL | color | used for “n/n”, e.g “1/1” | |
KUBECOLOR_THEME_DATA_RATIO_UNEQUAL | color | used for “n/m”, e.g “0/1” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_STATUS_SUCCESS | color | used in status keywords, e.g “Running”, “Ready” (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_STATUS_WARNING | color | used in status keywords, e.g “Terminating” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_STATUS_ERROR | color | used in status keywords, e.g “Failed”, “Unhealthy” (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_TABLE_HEADER | color | used on table headers (fallback to KUBECOLOR_THEME_BASE_INFO ) | bold |
KUBECOLOR_THEME_TABLE_COLUMNS | color[] | used on table columns when no other coloring applies such as status or duration coloring. The multiple colors are cycled based on column ID, from left to right. (fallback to [KUBECOLOR_THEME_BASE_INFO / KUBECOLOR_THEME_BASE_SECONDARY] ) | white / cyan |
KUBECOLOR_THEME_STDERR_ERROR | color | e.g when text contains “error” (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_STDERR_NONEFOUND | color | used on table output like “No resources found” (fallback to KUBECOLOR_THEME_DATA_NULL ) | gray:italic |
KUBECOLOR_THEME_STDERR_NONEFOUNDNAMESPACE | color | used on the namespace name of “No resources found in my-ns namespace” (fallback to KUBECOLOR_THEME_DATA_STRING ) | hiyellow |
KUBECOLOR_THEME_STDERR_DEFAULT | color | deprecated: this field is no longer used (since v0.4.0) | |
KUBECOLOR_THEME_APPLY_CREATED | color | used on “deployment.apps/foo created” (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_APPLY_CONFIGURED | color | used on “deployment.apps/bar configured” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_APPLY_UNCHANGED | color | used on “deployment.apps/quux unchanged” (fallback to KUBECOLOR_THEME_BASE_PRIMARY ) | magenta |
KUBECOLOR_THEME_APPLY_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_APPLY_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_CREATE_CREATED | color | used on “deployment.apps/foo created” (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_CREATE_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_CREATE_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_DELETE_DELETED | color | used on “deployment.apps “nginx” deleted” (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_DELETE_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_DELETE_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_DESCRIBE_KEY | color[] | used on keys. The multiple colors are cycled based on indentation. (fallback to KUBECOLOR_THEME_BASE_KEY ) | hicyan / cyan |
KUBECOLOR_THEME_DRAIN_CORDONED | color | used on “node/my-worker-node-01 cordoned” (fallback to KUBECOLOR_THEME_BASE_PRIMARY ) | magenta |
KUBECOLOR_THEME_DRAIN_EVICTINGPOD | color | used on “evicting pod my-namespace/my-pod” (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_DRAIN_EVICTED | color | used on “pod/my-pod evicted” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_DRAIN_DRAINED | color | used on “node/my-worker-node-01 drained” (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_DRAIN_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_DRAIN_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_EXPLAIN_KEY | color[] | used on keys. The multiple colors are cycled based on indentation. (fallback to KUBECOLOR_THEME_BASE_KEY ) | hicyan / cyan |
KUBECOLOR_THEME_EXPLAIN_REQUIRED | color | used on the trailing “-required-” string (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_EXPOSE_EXPOSED | color | used on “deployment.apps/foo created” (fallback to KUBECOLOR_THEME_BASE_PRIMARY ) | magenta |
KUBECOLOR_THEME_EXPOSE_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_EXPOSE_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_PRIMARY ) | magenta |
KUBECOLOR_THEME_OPTIONS_FLAG | color | e.g “—kubeconfig” (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_PATCH_PATCHED | color | used on “deployment.apps/foo patched” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_PATCH_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_PATCH_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_ROLLOUT_ROLLEDBACK | color | used on “deployment.apps/foo rolled back” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_ROLLOUT_PAUSED | color | used on “deployment.apps/foo paused” (fallback to KUBECOLOR_THEME_BASE_PRIMARY ) | magenta |
KUBECOLOR_THEME_ROLLOUT_RESUMED | color | used on “deployment.apps/foo resumed” (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_ROLLOUT_RESTARTED | color | used on “deployment.apps/foo restarted” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_ROLLOUT_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_ROLLOUT_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_SCALE_SCALED | color | used on “deployment.apps/foo scaled” (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_SCALE_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_SCALE_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_UNCORDON_UNCORDONED | color | used on “node/my-worker-node-01 uncordoned” (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_UNCORDON_DRYRUN | color | used on “(dry run)” and “(server dry run)“ (fallback to KUBECOLOR_THEME_APPLY_DRYRUN ) | cyan |
KUBECOLOR_THEME_UNCORDON_FALLBACK | color | used when outputs unknown format (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_VERSION_KEY | color[] | used on the key (fallback to KUBECOLOR_THEME_BASE_KEY ) | hicyan / cyan |
KUBECOLOR_THEME_HELP_HEADER | color | e.g “Examples:” or “Options:“ (fallback to KUBECOLOR_THEME_TABLE_HEADER ) | bold |
KUBECOLOR_THEME_HELP_FLAG | color | e.g “—kubeconfig” (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_HELP_FLAGDESC | color | Flag descripion under “Options:” heading (fallback to KUBECOLOR_THEME_BASE_INFO ) | white |
KUBECOLOR_THEME_HELP_URL | color | e.g [https://example.com] (fallback to KUBECOLOR_THEME_BASE_SECONDARY ) | cyan |
KUBECOLOR_THEME_HELP_TEXT | color | Fallback text color (fallback to KUBECOLOR_THEME_BASE_INFO ) | white |
KUBECOLOR_THEME_LOGS_KEY | color[] | (fallback to KUBECOLOR_THEME_DATA_KEY ) | hicyan / cyan |
KUBECOLOR_THEME_LOGS_QUOTEDSTRING | color | Used on quoted strings that are not part of a key="value" (fallback to KUBECOLOR_THEME_DATA_STRING ) | hiyellow |
KUBECOLOR_THEME_LOGS_DATE | color | (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_LOGS_SOURCEREF | color | (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_LOGS_GUID | color | (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_LOGS_SEVERITY_TRACE | color | (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_LOGS_SEVERITY_DEBUG | color | (fallback to KUBECOLOR_THEME_BASE_MUTED ) | gray:italic |
KUBECOLOR_THEME_LOGS_SEVERITY_INFO | color | (fallback to KUBECOLOR_THEME_BASE_SUCCESS ) | green |
KUBECOLOR_THEME_LOGS_SEVERITY_WARN | color | (fallback to KUBECOLOR_THEME_BASE_WARNING ) | yellow |
KUBECOLOR_THEME_LOGS_SEVERITY_ERROR | color | (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_LOGS_SEVERITY_FATAL | color | (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |
KUBECOLOR_THEME_LOGS_SEVERITY_PANIC | color | (fallback to KUBECOLOR_THEME_BASE_DANGER ) | red |