Convert RGB color values (0-255) to a hexadecimal color code.
Code
Utilitiesprintf '#%02x%02x%02x\n' "$r" "$g" "$b"Parameters
Red value (0-255).
Green value (0-255).
Blue value (0-255).
Server
More Bash Snippets
Hex to RGB
Convert a hex color code to RGB values.
Is Light Color
Check if a hex color is light (good for determining text color).
Random Hex Color
Generate a random hexadecimal color code for use in CSS or graphics applications.
Array Difference
Find elements in the first array that are not present in the second array.
Array Frequencies
Count how many times each value appears in an array and return a frequency map.
Array Head
Get the first n elements of an array.