npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

luscher-test

v2.2.1

Published

Lüscher color test

Downloads

20

Readme

Lüscher Color Test

JS implementation of Luscher psychological test.

Installation

npm install luscher-test
// or
yarn add luscher-test

Exported Constants

Main Color

Identificators of main test colors.

export enum MainColor {
    BLUE = 1,
    GREEN = 2,
    RED = 3,
    YELLOW = 4,
    PURPLE = 5,
    BROWN = 6,
    BLACK = 7,
    GRAY = 0,
}

Color HEX

HEX codes for test colors from the library.

export enum ColorHex {
  BLUE = '#004983',
  GREEN = '#1D9772',
  RED = '#F12F23',
  YELLOW = '#F2DD00',
  PURPLE = '#D42481',
  BROWN = '#C55223',
  BLACK = '#231F20',
  GRAY = '#98938D',
}

Usage

Luscher test have three variants: single stage test, two stage test ang full color test.

Single Stage Test

Сonsists of one sequential selection of colors and makes an interpretation on it.

import { SingleStageTest } from 'luscher-test'

// color codes in order of their selection
const selection = [3, 5, 6, 7, 1, 0, 2, 4];

const test = new SingleStageTest(selection); 

// single stage test interpretation 
const testInterpretation = test.interpret(); 

Two Stage Test

Consists of two sequential selections of colors between which it is recommended to wait a couple of minutes. The interpretation is based on both choices.

import { TwoStageTest } from 'luscher-test'

// color codes in order of their selection
const firstSelection = [2, 6, 3, 1, 0, 6, 7, 4];
const secondSelection = [5, 7, 3, 1, 0, 4, 2, 6];

const test = new TwoStageTest(firstSelection, secondSelection);

// two stage test interpretation 
// getInterpretation() returns Promise with test interpretation
const testInterpretation = await test.getInterpretation() 

Specific Data

// Obtained color selections
const selections: [MainColor[], MainColor[]] = test.selections; 
// Color pairs that occur in both selections
const pairs: [MainColor, MainColor][] = test.pairs; 
// Luscher groups in each selection 
const groups: [MainColor, MainColor?][][] = test.groups; 
// State of disturbance and compensation by color for each selection
const emotionalStates: [ColorMap<EmotionalState>, ColorMap<EmotionalState>] = test.emotionalStates; 
// State of anxiety level by color for each selection
const anxietyLevels: [ColorMap<1 | 2 | 3>, ColorMap<1 | 2 | 3>] = test.anxietyLevels; 
// Total anxiety level for each selection
const totalAnxietyLevel: [number, number] = test.totalAnxietyLevel; 
// Interpretation for total anxiety level of second selection
const anxietyLevelInterpretation: Translations<string> = test.anxietyLevelInterpretation; 
// Signs for each color
const signs: [ColorMap<[Sign, Sign?]>, ColorMap<[Sign, Sign?]>] = test.signs; 
// Colors for each sign
const signMaps: [SignMap<MainColor[]>, SignMap<MainColor[]>] = test.signMaps; 
// Final color pairs used to get interpretation by sign for each selection
const interpretationPairs: [SignMap<FunctionKeys[]>, SignMap<FunctionKeys[]>] = test.interpretationPairs; 

Full Color Test

Will be implemented in upcoming releases.