https://github.com/hasinhayder/colorconsole
Colorconsole provides an interesting way to display colored info, success, warning and error messages on the developer console in your browser
https://github.com/hasinhayder/colorconsole
javascript npm typescript
Last synced: about 1 year ago
JSON representation
Colorconsole provides an interesting way to display colored info, success, warning and error messages on the developer console in your browser
- Host: GitHub
- URL: https://github.com/hasinhayder/colorconsole
- Owner: hasinhayder
- Created: 2022-06-01T17:38:28.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-03T09:07:04.000Z (about 4 years ago)
- Last Synced: 2025-04-14T02:35:03.005Z (about 1 year ago)
- Topics: javascript, npm, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@hasinhayder/colorconsole
- Size: 17.6 KB
- Stars: 18
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ColorConsole NPM Package
Colorconsole provides an interesting way to display colored info, success, warning and error messages on the developer console in your browser.

## Available Methods
```javascript
colorconsole.warning("some warning message")
colorconsole.success("some success message")
colorconsole.info("some informations")
colorconsole.error("some error message")
colorconsole.log("normal message")
colorconsole.custom("custom message", "red", "#fff", 20, 5)
- custom parameters:
- message: string
- backgroundColor: name | hex | rgba | rgb | hsl
- textColor: name | hex | rgba | rgb | hsl
- fontSize: number
- padding: number
```
# Use in ESM Projects
```shell
npm install @hasinhayder/colorconsole
or
yarn add @hasinhayder/colorconsole
```
then
```javascript
import colorconsole from '@hasinhayder/colorconsole'
colorconsole.success("ColorConsole is Working")
colorconsole.log("A Simple Message, just like console.log()")
colorconsole.warning("This is a warning")
colorconsole.info("ColorConsole is an NPM package")
colorconsole.log("Available at https://www.npmjs.com/package/@hasinhayder/colorconsole")
colorconsole.log("Github Repo: https://github.com/hasinhayder/colorconsole")
colorconsole.error("Sample Error Message")
colorconsole.log("Isn't this beautiful?")
colorconsole.log("Check github repo url for the documentation")
colorconsole.custom("Make your own style", "red", "#fff", 20, 5)
```
# Use In Browser
```html
colorconsole.success("ColorConsole is Working")
colorconsole.log("A Simple Message, just like console.log()")
colorconsole.warning("This is a warning")
colorconsole.info("ColorConsole is an NPM package")
colorconsole.log("Available at https://www.npmjs.com/package/@hasinhayder/colorconsole")
colorconsole.log("Github Repo: https://github.com/hasinhayder/colorconsole")
colorconsole.error("Sample Error Message")
colorconsole.log("Isn't this beautiful?")
colorconsole.log("Check github repo url for the documentation")
colorconsole.custom("Make your own style", "red", "#fff", 20, 5)
```