Ubuntu-mate-colours

Hi Folks,
I'm having a play around with themes on an rpi4 and am struggling to use ubuntu-mate-colours to geneate some different coloured artworks. I'm sure I'm missing something blindingly obvious, but being fairly new to linux having migrated in from the world of Win10, the command line is proving a stumbling point.
No matter what variation of theme name I suppy I get the "unrecognized arguments" error. Where am I going wrong?
Thanks

./generate-ambiant-mate-colour.py --Ambiant-MATE-Dark #E9B96E Sand /home/d/ubuntu-mate-artwork/
usage: generate-ambiant-mate-colour.py [-h] [--theme NAME] [--hex CODE] [--name NAME] [--src-dir PATH]
                                       [--install-icon-dir PATH] [--install-theme-dir PATH]
                                       [--install-wallpapers-dir PATH] [--install-share-dir PATH] [-y]
                                       [-i] [--list-tweaks] [--tweaks TWEAKS]
generate-ambiant-mate-colour.py: error: unrecognized arguments: --Ambiant-MATE-Dark

It seems the python code needs a --theme NAME so call it with --theme Ambiant-MATE-Dark Also, look at all the other parms (note here that \ is a continuation marker).

./generate-ambiant-mate-colour.py   \
  --theme Ambiant-MATE-Dark         \
  --hex E9B96E

Thanks - guess i need to work on interpreting the help intructions. Next issue is with the --hex option...

--hex E9B96E results in

Invalid hex value: E9B96E
Values should be in long format: #FFFFFF

--hex #E9B96E results in

error: argument --hex: expected one argument

Maybe I should have just stuck to playing around with wallpapers... :grinning:

According to https://github.com/lah7/ubuntu-mate-colours/blob/master/generate-ambiant-mate-colour.py lines 147-151 parse the hex parameter. --hex #e9b96e should work. It expects a string to start with # and be of length 7. You can post on github your issue or even contact @lah7 here.

The hex value needs to be wrapped in single or double quotes, otherwise bash (the shell interpreter) thinks it's a comment.

:white_check_mark: This is good:

./generate-ambiant-mate-colour.py --theme Ambiant-MATE-Dark --hex "#E9B96E" --name Orange --src-dir /

:x: This doesn't work:

./generate-ambiant-mate-colour.py --theme Ambiant-MATE-Dark --hex #E9B96E --name Orange --src-dir /

I'll amend the logic to accept 'E9B96E' without the hash '#' too. :slight_smile:

1 Like

Thanks - guess i was getting a bit confused by the --help text:

  --theme NAME          Required. Ubuntu MATE theme to use, e.g. 'Ambiant-MATE'
  --hex CODE            Required. Colour value to use, e.g. '#5489CF'
  --name NAME           Required. Human readable suffix to identify variant, e.g. 'Blue'.

Quotes weren't needed to get the the other options working, were for that one - probably my lack of linux/cli knowledge and it's obvious to those more experienced in such dark arts. Great little tool by the way :+1:

1 Like