Can you tell me which part of the code i can change the colour !!!!!

Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
This will be simple for terminal people. in this code

Code:
cal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;32m')\1$(echo  '\033[0m')\2/"

what are the values i change to change the colour in this script. Its Geekt tool script for Monthly Calendar with todays date in the colour close to the colour in this HTML Colour Chart

So if you could repost the code with the values to change and ill try and play with it from there.
If its not a HTML colour code please also let me no which set of colour code i need to use.
Any help as usual appreciated . . . .

Vansmith are you there ;)
 
OP
TattooedMac
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
This will be simple for terminal people. in this code

Code:
cal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;32m')\1$(echo  '\033[0m')\2/"

what are the values i change to change the colour in this script. Its Geekt tool script for Monthly Calendar with todays date in the colour close to the colour in this HTML Colour Chart that i pinned to the page.

Im guessing the \33[0m part of it ????

So if you could repost the code with the values to change and ill try and play with it from there.
If its not a HTML colour code please also let me no which set of colour code i need to use.
Any help as usual appreciated . . . .

Vansmith are you there ;)
 
OP
TattooedMac
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
OOPS sorry mods. Dont know what happened please merge !!!

Van ?? lol
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Done. ;)

\033[1;32m - that's the beginning
\033[0m - that's the end


So, everything between those two will be coloured. And, if I'm reading that right, it's green. What colour did you want to change it to?
 
OP
TattooedMac
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
Cool thanks mate. Yes green is is. Very Lime greeny and bc of my desktop this month, check out The DToTM thread i am wanting a dark and doomy blue or a faint light blue.

So you read ')\1$(echo ' as green ?? How ?? How and what colour code code is used ??

20110612-fumi5r5krb955qafqeb3b6de6i.jpg
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
"Dark" Blue (not super dark):
Code:
cal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;34m')\1$(echo  '\033[0m')\2/"

Light Blue:
Code:
cal | sed -E '1,$'"s/ ($(date +%e))( |$)/ $(echo '\033[1;36m')\1$(echo  '\033[0m')\2/"
 
OP
TattooedMac
Joined
May 19, 2009
Messages
8,428
Reaction score
295
Points
83
Location
Waiting for a mate . . .
Your Mac's Specs
21" iMac 2.9Ghz 16GB RAM - 10.11.3, iPhone6s & iPad Air 2 - iOS 9.2.1, ATV 4Th Gen tvOS, ATV3
Nice thanks for that Vansmith. Gone with the dark blue as there isnt a great deal of colour spectrum in the values. I found changing the first value to 4 puts a box around the number. Cool. For me anyways lol
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Glad to hear it worked out for you. Here's a page with colour codes. It might be a bit confusing but you should be able to figure out what to replace in your current command if you want to change the colours. If not, you know where to ask! ;)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top