
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@gesslar/colours
Advanced tools
256 colours for your terminal expressions. Template literal-based ANSI colour library with precise colour selection, granular styles, and semantic aliases.
npm install @gesslar/colours
import c from '@gesslar/colours'
console.log(c`{F045}Running:{/} {F213}${testName}{/}`)
console.log(c`{F034}[OK]{/} Build completed {F240}(${time}ms){/}`)
console.log(c`{F196}[ERR]{/} {<B}Error:{/} ${message}`)
Use any colour from the 256-colour terminal palette:
// Foreground colours
c`{F045}Bright green text{/}`
c`{F196}Red text{/}`
c`{F033}Blue text{/}`
// Background colours
c`{B196}Red background{/}`
c`{B045}Green background{/}`
// Combined
c`{F255}{B196}White text on red background{/}`
Turn styles on and off individually:
// Turn on styles
c`{<BU}Bold and underlined{/}`
c`{<I}Italic text{/}`
c`{<S}Strikethrough{/}`
// Turn off specific styles
c`{<BIU}All three{B>}italic and underlined{I>}just underlined{/}`
// Available styles:
// - B(old)
// - D(im)
// - F(lash)
// - I(talic)
// - O(verline)
// - R(everse),
// - S(trikethrough)
// - U(nderline)
Create meaningful names for your colours:
// Set up aliases
c.alias.set("success", "{F034}")
c.alias.set("error", "{F196}")
c.alias.set("warning", "{F214}")
c.alias.set("muted", "{F240}")
// Use them in your code
console.log(c`{success}[OK]{/} Operation completed`)
console.log(c`{error}[ERR]{/} Something went wrong`)
console.log(c`{warning}!{/} Check this out {muted}(optional){/}`)
// Complex aliases with styles
c.alias.set("header", "{F045}{<BU}")
console.log(c`{header}IMPORTANT SECTION{/}`)
import c from '@gesslar/colours'
// Status messages
const success = (msg) => console.log(c`{F034}[OK]{/} ${msg}`)
const error = (msg) => console.log(c`{F196}[ERR]{/} ${msg}`)
const info = (msg) => console.log(c`{F045}[INFO]{/} ${msg}`)
success("Build completed successfully")
error("Failed to load configuration")
info(`Processing ${count} files...`)
// Before: boring
console.log(`Running: ${testName}`)
console.log(`[OK] ${testName} passed (${time}ms)`)
// After: beautiful
console.log(c`{F045}Running:{/} {F213}${testName}{/}`)
console.log(c`{F034}[OK]{/} {F085}${testName}{/} passed {F240}(${time}ms){/}`)
const debug = {
error: (msg) => console.log(c`{F196}{<B}[ERROR]{/} ${msg}`),
warn: (msg) => console.log(c`{F214}[WARN]{/} ${msg}`),
info: (msg) => console.log(c`{F045}[INFO]{/} ${msg}`),
debug: (msg) => console.log(c`{F240}[DEBUG]{/} ${msg}`)
}
{F###} - Foreground colour (0-255){B###} - Background colour (0-255){/} - Reset all formatting{<STYLES} - Turn on styles (e.g., {<BU} for bold+underline){STYLES>} - Turn off styles (e.g., {B>} to turn off bold)B - Bold/BrightD - DimF - Flash/BlinkI - ItalicO - OverlineR - ReverseS - StrikethroughU - Underline{aliasName} - Any alias you've createdcolours command to see the colour chart (if CLI installed)c`{F045}text{/}c`template - Process template literal with colour codesc.alias.set(name, replacement) - Create an aliasc.alias.del(name) - Remove an aliasvs ansi-colours:
c`{F045}text{/} vs ansiColors.rgb(255,100,50)('text').yellowBright actually looks likevs chalk:
The Unlicense, because colours belong to everybody and if you disagree, well, you probably would download a car. 🤨
"I want green here, but which green?" -> colours -> "oooo ok that one"
The workflow that just works.
FAQs
256 colours for your terminal expressions. You're welcome.
We found that @gesslar/colours demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.