Code Monkey home page Code Monkey logo

trucolor's Introduction

TruColor

A node module and CLI utility for using 24bit color SGR codes in modern terminals.

Publishing Status

npm Libraries.io
Travis Rollup

Development Status

Travis Libraries.io
Snyk Code-Climate Code-Climate Coverage

Documentation/Help

Twitter

v4 Breaking change The CLI command has been seperated into it's own repo trucolor-cli

Usage

Installation

npm install --save @thebespokepixel/trucolor

Usage

import {trucolor, palette, chalkish, simple} from 'trucolor'

const simpleColor = trucolor('bright red')
console.log(`${simpleColor.in}simpleColor${simpleColor.out}`)

const simplePalette = simple()
console.log(`${simplePalette.red}simplePalette Red${simplePalette.red.out}`)
console.log(`${simplePalette.blue}simplePalette Blue${simplePalette.blue.out}`)

const myPalette = palette({}, {
  red: '#F00',
  blue: 'lighten 30 blue'
})
console.log(`${myPalette.red}myPalette Red${myPalette.red.out}`)
console.log(`${myPalette.blue}myPalette Blue${myPalette.blue.out}`)

const myChalkishPalette = chalkish(palette({}, {
  red: '#F00',
  blue: 'lighten 30 blue'
}))
console.log(myChalkishPalette.red('myChalkishPalette Red'))
console.log(myChalkishPalette.blue('myChalkishPalette Blue'))

See es-tinycolour for complete colour input syntax.

Documentation

Full documentation can be found at https://thebespokepixel.github.io/trucolor/

trucolor's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar markgriffiths avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

trucolor's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

An in-range update of shelljs is breaking the build 🚨

The devDependency shelljs was updated from 0.8.2 to 0.8.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

shelljs is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 20 commits.

  • d4d1317 0.8.3
  • db317bf Add test case for sed on empty file (#904)
  • 0d5ecb6 docs(changelog): updated by Nate Fischer [ci skip]
  • 6b3c7b1 refactor: don't expose tempdir in common.state (#903)
  • 4bd22e7 chore(ci): fix codecov on travis (#897)
  • 2b3b781 fix: silent exec (#892)
  • 37acb86 chore(npm): add ci-or-install script (#896)
  • 4e861db chore(appveyor): run entire test matrix (#886)
  • d079515 docs: remove gitter badge (#880)
  • 4113a72 grep includes the i flag (#876)
  • 8dae55f Fix(which): match only executable files (#874)
  • 6d66a1a chore: rename some tests (#871)
  • 131b88f Fix cp from readonly source (#870)
  • 1dd437e fix(mocks): fix conflict between mocks and skip (#863)
  • 72ff790 chore: bump dev dependencies and add package-lock (#864)

There are 20 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of documentation-theme-bespoke is breaking the build 🚨

The devDependency documentation-theme-bespoke was updated from 0.4.4 to 0.4.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

documentation-theme-bespoke is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of babel7 is breaking the build 🚨

There have been updates to the babel7 monorepo:

    • The devDependency @babel/core was updated from 7.1.2 to 7.1.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.

babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of yargs is breaking the build 🚨

The dependency yargs was updated from 13.2.2 to 13.2.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

yargs is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 14 commits.

  • a6e67f1 chore(release): 13.2.4
  • fc13476 chore: update standard-verison dependency
  • bf46813 fix(i18n): rename unclear 'implication failed' to 'missing dependent arguments' (#1317)
  • a3a5d05 docs: fix a broken link to MS Terminology Search (#1341)
  • b4f8018 build: add .versionrc that hides test/build
  • 0c39183 chore(release): 13.2.3
  • 08e0746 chore: update deps (#1340)
  • 843e939 docs: make --no- boolean prefix easier to find in the docs (#1338)
  • 84cac07 docs: restore removed changelog of v13.2.0 (#1337)
  • b20db65 fix(deps): upgrade cliui for compatibility with latest chalk. (#1330)
  • c294d1b test: accept differently formatted output (#1327)
  • ac3f10c chore: move .hbs templates into .js to facilitate webpacking (#1320)
  • 0295132 fix: address issues with dutch translation (#1316)
  • 9f2468e doc: clarify parserConfiguration object structure (#1309)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

node v9

Currently node v9 is not supported. Any plans on this?

As workaround i currently have:

.yarnrc

--add.ignore-engines true
--install.ignore-engines true

package.json

{
    "postinstall": "node _fix-bespoke.js"
}

_fix-bespoke.js

const fs = require('fs')
const path = require('path')
const globule = require('globule')

let packages = [
    '@thebespokepixel/es-tinycolor',
    '@thebespokepixel/meta',
    '@thebespokepixel/n-selector',
    '@thebespokepixel/string',
    '@thebespokepixel/time',
    'trucolor',
    'truwrap',
    'verbosity',
    'sgr-composer',
    'term-ng'
]


packages.forEach(name => {
    console.log('packesgs')
    let paths = globule.find(path.resolve('node_modules', name, '**/*', 'index-v8.js'));
    paths.forEach(path => {
        if(!fs.existsSync(path)) {
            return;
        }
        let destPath = path.replace('v8', 'v9');
        if(!fs.existsSync(destPath)) {
            console.log({path,destPath})
            fs.writeFileSync(destPath, fs.readFileSync(path, 'utf-8'), 'utf-8');
        }

    })
})

An in-range update of sgr-composer is breaking the build 🚨

The dependency sgr-composer was updated from 2.0.0 to 2.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sgr-composer is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Commits

The new version differs by 3 commits.

  • fa182fe Update Dependencies
  • 835da4b Merge branch 'release/v2.0.0' into develop
  • 968ff75 Update Documentation

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

How do i using output background when using trucolor programmaticly

For example:

function getColor(color){
  return trucolor.bulk({ output: 'sgr|value|swatch' }, { color: color }).color
}
// works fine
var c= getColor('red')
console.log(c.in + ' this is red text ' + c.out);

// does not work, the text is red instead of the background
var bc = getColor('background red')
console.log(bc.in + ' this is red bg ' + bc.out);

How can i color backgrounds? Been searching trough the code but i haven't been able to do this

An in-range update of truwrap is breaking the build 🚨

The dependency truwrap was updated from 1.0.0 to 1.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

truwrap is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 8 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of update-notifier is breaking the build 🚨

The dependency update-notifier was updated from 2.5.0 to 2.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

update-notifier is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 10 commits.

  • 622ee5f 2.6.0
  • ad8ed1b Suggest yarn when installed with yarn (#132)
  • 5f06620 Exit the update check process if it does not respond after 30s (#156)
  • 79e89ad Fix failing test (#155)
  • c8faa84 Add distTag option (#151)
  • 14632e4 Add failing test for #153 (#154)
  • aafd8a0 Require Node.js 8
  • 0d49f51 Add Tidelift mention in the readme
  • 8df01b3 Fix docs position of shouldNotifyInNpmScript (#143)
  • d371834 Docs: isGlobal option does not default to true (#142)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of rollup is breaking the build 🚨

The devDependency rollup was updated from 1.18.0 to 1.19.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 6 commits.

  • 9af119d 1.19.0
  • b3f361c Update changelog
  • 456f4d2 Avoid variable from empty module name be empty (#3026)
  • 17eaa43 Use id of last module in chunk as name base for auto-generated chunks (#3025)
  • 871bfa0 Switch to a code-splitting build and update dependencies (#3020)
  • 2443783 Unified file emission api (#2999)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of documentation-theme-bespoke is breaking the build 🚨

The devDependency documentation-theme-bespoke was updated from 1.0.3 to 1.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

documentation-theme-bespoke is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of verbosity is breaking the build 🚨

The dependency verbosity was updated from 2.0.0 to 2.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

verbosity is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Commits

The new version differs by 3 commits.

  • b675dce Update Dependencies
  • fb3f478 Merge branch 'release/v2.0.0' into develop
  • 5fa354b Update Documentation

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of gulp-better-rollup is breaking the build 🚨

The devDependency gulp-better-rollup was updated from 3.3.0 to 3.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

gulp-better-rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 6 commits.

  • b03c48d 3.4.0
  • efe683f Add engines to package.json (#26)
  • 7663f43 fix(package): update rollup to version 0.66.0 (#31)
  • e5696bf fix(package): update rollup to version 0.65.1 (#29)
  • 82df2b4 Merge pull request #25 from MikeKovarik/greenkeeper/rollup-0.63.0
  • 83d3534 fix(package): update rollup to version 0.63.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.