- Project Status
Convert decimal red, green and blue colors to hexadecimal format from the command line with a few options…
This is a command line utility written in the Rust programming language.
This should work in command lines in Linux, Windows, & MacOs.
I do a lot with color in various environments from web & graphic design to programming and I do many things from the command line and I wanted a more
programmatic method than my normal various functions/scripts across various environments and languages that do the same, but I can instead just use this one program across any environment.
This is a cross-platform command line tool in binary executable format that can be used in command lines/consoles/terminals/ttys/shells in Linux, Windows, and MacOs.
This program’s name has various versions, but they should all be renamed to:
This was written in Linux, but tested in Linux and Windows. Sorry MacOs users; I do not have a Mac, but I do know the operating system well and it has been written properly for the system had compiled successfully as can be seen in this repositories build history and should run fine. Please let me know if it doesn’t.
This is currently provided as a compiled binary that is either portable or can be installed in Linux with the Debian -
.deb package installer, but if there’s enough interest I can also provide an AppImage at some point.
The main program file is meant to be executable and in Windows that’s not usually an issue, but in Linux and MacOs you may need to set the permissions.
In a Linux or MacOs command line run:
# executable for all users chmod +x /path/to/rgbtohexr # or chmod 755 /path/to/rgbtohexr # executable for current user only chmod u+x /path/to/rgbtohexr
This program is portable, but there is a Debian (.deb file) package installer for the Linux binary version.
The file: rgbtohexr.deb is a Linux Debian package installer for use on most Linux Debian based operating systems.
Install By (Double) Clicking
Like many other executable files this should be able to be clicked or double clicked to execute and it should open in the systems software manager gui.
Install Command Line Method
Install from command line with:
sudo dpkg -i /path/to/rgbtohexr.deb
I imagine this can be installed with gdebi, but I’m not familiar with it.
Uninstall Command Line Method
sudo apt remove rgbtohexr # -y to skip prompt approval
Portable applications do not need to be installed, but they are easier to use if they are in one of a systems
If the program file is not in
PATH (or in the current directory) then you must run it with the complete path url:
& '\Path\To\rgbtohexr.exe' --help
If the file is place in
PATH then you can run it with:
Operating System PATH
PATH directories are stored and can listed in the various operating systems
|Operating System||Variable Name|
Used in many command lines across 3 main operating systems (and more).
Operating System Environment
3 main operating systems:
Command Line Environment
Used in any command line environment from Linux Shell to Windows PowerShell.
- many more…
- Same as Linux I imagine.
A few random examples:
╭─«flux»─«~» ╰─»»» rgbtohexr 255 0 0 ff0000 ╭─«flux»─«~» ╰─»»» rgbtohexr --html 255 127 127 #ff7f7f ╭─«flux»─«~» ╰─»»» rgbtohexr --upper --hex 255 63 255 0xFF3FFF ╭─«flux»─«~» ╰─»»» rgbtohexr -ut 127 63 255 #7F3FFF ╭─«flux»─«~» ╰─»»» rgbtohexr 127 63 h Passed argument is not an integer between 0-255. ╭─«flux»─«~» ╰─»»»
The Help screen:
╭─«flux»─«~» ╰─»»» rgbtohexr --help 'rgbtohexr' Convert decimal [Red], [Green], and [Blue] colors to hexadecimal format. @USAGE: rgbtohexr [OPTIONS...] rgbtohexr INTEGERS... rgbtohexr [OPTIONS...] INTEGERS... @OPTIONS: -h,--help This help screen. -u,--upper Retrieve output as uppercase. -t,--html Retrieve output as 'HTML':'#FFFFFF' -x,--hex Retrieve output as 'HEX':'0xFFFFFF' Default format:'FFFFFF' @INTEGERS: 3 integers from 0-255 that represent the corresponding [Red],[Green], and [Blue] colors. @ERRORS: Exit Codes 0 No errors. 1 Not enough arguments passed. 2 Passed argument is not an integer between 0-255. ╭─«flux»─«~» ╰─»»»
All links pertinent to this project.
All of the most current, up-to-date files are located on the ‘Stable Release’ page.
Current project links.
|Main repository - themed version.||https://lateralus138.github.io/rgbtohexr|
Current release files.
These are all the files included under ‘Stable Release’ on the ‘Current Releases’ page.
|rgbtohexr.deb||Debian package installer.||./target/release/rgbtohexr.deb|
|rgbtohexr_linux||Main Linux executable.||./target/release/rgbtohexr_linux|
|rgbtohexr_darwin||Main MacOS executable.||.target/release/rgbtohexr_darwin|
|rgbtohexr_windows.exe||Main Windows executable.||./target/release/rgbtohexr_windows.exe|
|Project Release Date|
|Total downloads for this project|
|Complete repository size|
|Commits in last month|
|Commits in last year|
Latest Version Status
|Total downloads for current version|
Latest Build Status
|2||AppImage is a portable executable system with sand-boxing capabilities and no need to worry about dependencies. There isn’t much need to have an AppImage with this seeing that it has no dependencies, but if anyone wants it I will considering creating one.||DuckDuckGo Search|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.