HTB recently release it’s web VM PwnBox which is running ParrotOS. The shell of choice is bash with a slick PS1 layout. I like to use ZSH combined with oh-my-zsh for extra juice, and decided to take a stab at writing a theme for oh-my-zsh. Knowing nothing about how to do this, I grabbed an existing one for an example and started tearing it apart and adding what I needed. I’ve added a bit more to my shell with cowsay, lolcat and I use Guake Terminal for it’s top-down feature(quake, old habbits die hard :) )
Here is what HTB PwnBox BASH shell looks like
To use hex color codes for example: #9fef00 from the HTB Syle guide (https://www.hackthebox.com/docs/Hack_The_Box_Brand_Assets_Guide.pdf) in a 256-color terminal, you need to find the closest matching color in the 256-color palette. Unfortunately, the 256-color palette doesn't have an exact match for #9fef00, but you can find a close approximation.
Here's how to approximate the given color:
- Convert the hex color #9fef00 to RGB: (159, 239, 0).
- Normalize the RGB values to a range of 0 to 5 by dividing each value by 51 and rounding to the nearest integer: (3, 5, 0).
- Calculate the 256-color palette index using the formula: 16 + 36 * R + 6 * G + B, where R, G, and B are the normalized values: 16 + 36 * 3 + 6 * 5 + 0 = 154.
The closest approximation of #9fef00 in the 256-color palette is color code 154. To use this color in your terminal, you can set the foreground or background color using %F{154} or %K{154} in your Zsh theme configuration.