New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

komodo-scheme

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

komodo-scheme

A class for parsing Komodo Edit/IDE scheme files (*.ksf) into a workable format.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

Parse Komodo Edit/IDE Scheme files in Node.js

Usage

var KomodoScheme = require('komodo-scheme').Parser;

var scheme = new KomodoScheme({ path: '/path/to/Scheme.ksf' });
console.log(scheme.toCSS());

// Outputs:
// .ksf-attribute-name { color: #781f87; }
// .ksf-bracebad { background-color: #3f3f3f; font-weight: bold; color: #9090c6 }
// ... etc ...

// Language-Specific CSS:
console.log(scheme.toCSS('hex', 'Django'));

// CSS color values as RGB:
console.log(scheme.toCSS('rgb'));

// Custom prefix before each selector:
console.log(scheme.toCSS('rgb', '', '#preview'));

// Or, individual scheme attributes can be accessed through a hash:
console.log(scheme.commonStyles.strings.fore);

Also included is a Color class which provides parsing of the BGR color into several formats

var Color = require('komodo-scheme').Color;
var c = new Color(scheme.commonStyles.strings.fore);

console.log(c.toRGB());
// outputs:  [144,144,198]

console.log(c.toHtmlRGB());
// outputs:  'rgb(144,144,198)'

console.log(c.toHtmlHex());
// outputs:  '#9090c6'

Running Tests

$ bash test.sh

Keywords

FAQs

Package last updated on 04 Feb 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc