Commands
Hex
Documentation for the /hex command for hexadecimal conversions
/hex
Command
The /hex
command provides tools for hexadecimal conversions.
Available Subcommands
/hex to-rgb
Converts a hexadecimal color code to RGB values.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
color | The hexadecimal color code (e.g., #FF5733, FF5733 or F53) | Yes | Discord (parameter), Slack (directly after action) |
Example
Result: RGB(255, 87, 51)
/hex to-hsl
Converts a hexadecimal color code to HSL values.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
color | The hexadecimal color code to convert | Yes | Discord (parameter), Slack (directly after action) |
Example
Result: HSL(14, 100%, 60%)
/hex to-string
Converts a hexadecimal string to text.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The hexadecimal string to convert | Yes | Discord (parameter), Slack (directly after action) |
Example
Result: Hello
/hex to-decimal
Converts a hexadecimal value to decimal.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The hexadecimal value to convert | Yes | Discord (parameter), Slack (directly after action) |
Example
Result: 255
/hex from-string
Converts text to hexadecimal values.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The text to convert to hexadecimal | Yes | Discord (parameter), Slack (directly after action) |
Example
Result: 48656C6C6F
/hex from-decimal
Converts a decimal number to hexadecimal value.
Usage
Options
Option | Description | Required | Platform |
---|---|---|---|
input | The decimal number to convert | Yes | Discord (parameter), Slack (directly after action) |
Example
Result: FF
Platform-Specific Implementation
Discord Implementation
- Commands use Discord’s named parameter system (e.g.,
color:
,input:
) - Responses appear as embedded messages with color-coding
- For color conversions, the embedded message uses the actual color for visual feedback
Slack Implementation
- Commands use a simpler format without named parameters
- Input is provided directly after the action (e.g.,
/hex to-rgb #FF5733
) - Responses are shown with formatted blocks displaying the result and related information
- Color conversions include a colored attachment for visual preview
- Supports quoted arguments for inputs containing spaces
Use Cases
- Convert color codes for different CSS formats
- Encode/decode binary data in hexadecimal
- Convert between decimal and hexadecimal number systems
- Analyze color codes for web design
Notes
- Hexadecimal values are not case-sensitive
- For color codes, the # prefix is optional
- When converting to decimal, the “0x” prefix is optional