derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
26.52k stars 1.66k forks source link

Unable to color all parts of the UI for custom scheme #2653

Open MindTooth opened 5 months ago

MindTooth commented 5 months ago




Describe the bug I'm trying to make a scheme for Srcery, but I seem to be unable to color all parts of the UI. Or at least I don't understand how. 😝

The one problem I have is that I'm unable to color the table head background (the Pods(default)[0]).

Sorry if it's to show of an issue. Let me know if something is missing.

To Reproduce Steps to reproduce the behavior:

  1. Put the attached config into skins/srcery.yaml
  2. Set ut.skin: srcery
  3. See skin that is not totally empty

Historical Documents

Config

Configuration ```yaml k9s: liveViewAutoRefresh: false screenDumpDir: /Users/birgerjn/Library/Application Support/k9s/screen-dumps refreshRate: 2 maxConnRetry: 5 readOnly: false noExitOnCtrlC: false ui: enableMouse: false headless: false logoless: false crumbsless: false reactive: true noIcons: false defaultsToFullScreen: false # skin: srcery skipLatestRevCheck: false disablePodCounting: false shellPod: image: busybox:1.35.0 namespace: default limits: cpu: 100m memory: 100Mi imageScans: enable: false exclusions: namespaces: [] labels: {} logger: tail: 100 buffer: 5000 sinceSeconds: -1 textWrap: false showTime: false thresholds: cpu: critical: 90 warn: 70 memory: critical: 90 warn: 70 ```
Srcery - all colors set to background ```yaml # ----------------------------------------------------------------------------- # Stock skin # ----------------------------------------------------------------------------- # Skin... k9s: body: fgColor: "#1C1B19" bgColor: "#1C1B19" logoColor: "#1C1B19" prompt: fgColor: "#1C1819" bgColor: "#1C1B19" suggestColor: "#1C1B19" info: fgColor: "#1C1B19" sectionColor: "#1C1819" dialog: fgColor: "#1C1B19" bgColor: "#1C1B19" buttonFgColor: "#1C1B19" buttonBgColor: "#1C1B19" buttonFocusFgColor: "#1C1819" buttonFocusBgColor: "#1C1819" labelFgColor: "#1C1B19" fieldFgColor: "#1C1B19" frame: border: fgColor: "#1C1819" focusColor: "#1C1B19" menu: fgColor: "#1C1819" keyColor: "#1C1B19" numKeyColor: "#1C1819" crumbs: fgColor: "#1C1819" bgColor: "#1C1819" activeColor: "#1C1B19" status: newColor: "#1C1819" modifyColor: "#1C1B19" addColor: "#1C1819" errorColor: "#1C1B19" pendingColor: "#1C1B19" highlightColor: "#1C1B19" killColor: "#1C1819" completedColor: "#1C1819" title: fgColor: "#1C1B19" # THIS IS TEXT highlightColor: "#1C1819" counterColor: "#1C1819" filterColor: "#1C1819" views: # Charts skins... charts: bgColor: "#1C1B19" defaultDialColors: - "#1C1819" - "#1C1B19" defaultChartColors: - "#1C1819" - "#1C1B19" table: fgColor: "#1C1819" bgColor: "#1C1B19" cursorFgColor: "#1C1B19" cursorBgColor: "#1C1B19" markColor: "#1C1819" header: fgColor: "#1C1819" bgColor: "#1C1B19" sorterColor: "#1C1B19" xray: fgColor: "#1C1819" bgColor: "#1C1B19" cursorColor: "#1C1B19" graphicColor: "#1C1819" showIcons: true yaml: keyColor: "#1C1819" colonColor: "#1C1819" valueColor: "#1C1819" logs: fgColor: "#1C1819" bgColor: "#1C1B19" indicator: fgColor: "#1C1B19" bgColor: "#1C1B19" toggleOnColor: "#1C1819" toggleOffColor: "#1C1819" ```

Not sure how to produce a log. k9s -l debug does nothing extra.

When applicable please include any supporting artifacts: k9s debug logs, configurations, resource manifests, ...

Expected behavior I want to be able to skin all. Or at least fix the issues I have so that I can proceed.

Screenshots

Default

Screenshot 2024-04-05 at 09 26 24

Srcery (just test to see if I can skin all)

Screenshot 2024-04-05 at 09 25 59

Versions (please complete the following information):

Additional context Add any other context about the problem here.

wjiec commented 5 months ago

hi, your skin config is missing the k9s.frame.title.bgColor field, if you don't configure this field, then the default background color is #000000.

MindTooth commented 5 months ago

hi, your skin config is missing the k9s.frame.title.bgColor field, if you don't configure this field, then the default background color is #000000.

Nice. It works. :smile:

However, I still have the orange for n/a and a black line/background for the table row still (the selected line) (you can barely see it) :

Screenshot 2024-04-18 at 13 02 10

This might not be useful, but I based this one https://github.com/derailed/k9s/blob/master/skins/stock.yaml which maybe lacks some of the options.

Ed1t: also noticed that the command border is not colored correctly.

Screenshot 2024-04-18 at 13 27 09

Ed2t:

Screenshot 2024-04-18 at 13 29 20

placintaalexandru commented 5 months ago

Related to #1951 I believe one of the two can be closed and keep only one issue