Giter Club home page Giter Club logo

luscher-test's Introduction

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, 5, 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
async function someAsyncFunction() {
  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.

luscher-test's People

Contributors

a-baranova avatar temoncher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

vladimir-vortex

luscher-test's Issues

Source of colors

Hi,

where did you get the color codes for the test?

Are they in any way related to the original print form?

Thank you.

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.