nsis64 / Include / Colors.nsh

!ifndef COLORS_NSH
!define COLORS_NSH

!verbose push
!verbose 3

# Squad
# Rob Segal
# Joel
# Yathosho


# Predefined HTML Hex colors
!define WHITE "FFFFFF"
!define BLACK "000000"
!define YELLOW "FFFF00"
!define RED "FF0000"
!define GREEN "00FF00"
!define BLUE "0000FF"
!define MAGENTA "FF00FF"
!define CYAN "00FFFF"

# Function to convert red , green and blue integer values to HTML Hex format
!define RGB '!insertmacro rgb2hex'

# Function to convert red, green and blue integer values to Hexadecimal (0xRRGGBB) format
!define HEX '!insertmacro rgb2hex2'

# Function to get the r value from a RGB number
!define GetRvalue '!insertmacro redvalue'

# Function to get the g value from a RGB number
!define GetGvalue '!insertmacro greenvalue'

# Function to get the b value from a RGB number
!define GetBvalue '!insertmacro bluevalue'

# Function to get the r value from a Hex number
!define GetRvalueX '!insertmacro bluevalue'

# Function to get the g value from a Hex number
!define GetGvalueX '!insertmacro greenvalue'

# Function to get the r value from a HEX number
!define GetBvalueX '!insertmacro redvalue'

!macro rgb2hex output R G B
IntFmt "${output}" "%02X" "${R}"
IntFmt "${output}" "${output}%02X" "${G}"
IntFmt "${output}" "${output}%02X" "${B}"
!macroend

!macro rgb2hex2 output R G B
IntFmt "${output}" "%02X" "${B}"
IntFmt "${output}" "${output}%02X" "${G}"
IntFmt "${output}" "${output}%02X" "${R}"
!macroend

!macro redvalue output hexval
StrCpy ${output} ${hexval} 2 0
IntFmt "${output}" "%02i" "0x${output}"
!macroend

!macro greenvalue output hexval
StrCpy ${output} ${hexval} 2 2
IntFmt "${output}" "%02i" "0x${output}"
!macroend

!macro bluevalue output hexval
StrCpy ${output} ${hexval} 2 4
IntFmt "${output}" "%02i" "0x${output}"
!macroend

!verbose pop
!endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.