This is a chat bot using Microsoft Bot Framework that identifies color name from hex and hexcode from color name.
The minimum prerequisites to run this app are:
- Latest Node.js with NPM. Download it from here.
- The Bot Framework Emulator. To install the Bot Framework Emulator, download it from here. Please refer to this documentation article to know more about the Bot Framework Emulator.
Key | How to get the key |
---|---|
BingSearchAPIKey | https://azure.microsoft.com/en-us/try/cognitive-services/?api=bing-web-search-api |
ComputerVisionAPIKey | https://azure.microsoft.com/en-us/try/cognitive-services/my-apis/?api=computer-vision-api |
Create a .env file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE
BingSearchAPIKey=BING_SEARCH_API_HERE
ComputerVisionAPIKey=COMPUTER_VISION_API_HERE
cp .env-sample .env
- This bot is looking for the pattern "find the name of #HEX" and "find the hex of COLORNAME".
- Extracts the HEX/COLOR NAME value
- Do lookup
- Return the result
- This bot is looking for the pattern "what is the color of OBJECT".
- Extracts the OBJECT value
- Search using Bing Image Search API
- Get the first search result image
- Call Azure Cognitive Vision API to analyze the image with category "Color" and return the color