{"id":27157739,"url":"https://github.com/anomal/rainbowvis-js","last_synced_at":"2025-05-16T11:03:57.135Z","repository":{"id":2533868,"uuid":"3510746","full_name":"anomal/RainbowVis-JS","owner":"anomal","description":"A JavaScript library for colour data visualization. Easily map numbers to a smooth-transitioning colour legend.","archived":false,"fork":false,"pushed_at":"2022-07-28T22:45:09.000Z","size":30,"stargazers_count":355,"open_issues_count":5,"forks_count":76,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-08T22:57:47.251Z","etag":null,"topics":["color","colour","javascript","visualization"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anomal.png","metadata":{"files":{"readme":"readme.markdown","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-22T02:42:03.000Z","updated_at":"2025-04-19T03:52:26.000Z","dependencies_parsed_at":"2022-07-16T05:30:45.312Z","dependency_job_id":null,"html_url":"https://github.com/anomal/RainbowVis-JS","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anomal%2FRainbowVis-JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anomal%2FRainbowVis-JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anomal%2FRainbowVis-JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anomal%2FRainbowVis-JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anomal","download_url":"https://codeload.github.com/anomal/RainbowVis-JS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color","colour","javascript","visualization"],"created_at":"2025-04-08T21:36:02.452Z","updated_at":"2025-05-16T11:03:57.105Z","avatar_url":"https://github.com/anomal.png","language":"JavaScript","readme":"RainbowVis-JS\n=============\n\nA JavaScript library for colour data visualization. Easily map numbers to a smooth-transitioning colour legend.\n\nThe Rainbow class by default maps the range 0 to 100 (inclusive) to the colours of the rainbow (i.e., a gradient transitioning from red to yellow to lime to blue).\n\nSee example.html\n\n`var rainbow = new Rainbow();` creates new instance of Rainbow. By default, the number range is from 0 to 100, and the spectrum is a rainbow.\n\n`rainbow.colourAt(number);` returns the hex colour corresponding to the number. If number is out of range, it returns the appropriate hex colour corresponding to either the minNumber or maxNumber.\n\n`rainbow.setSpectrum(colour1, colour2 [,colourN]);` sets the spectrum of the Rainbow object. By default, the spectrum is a rainbow. You must have a minimum of two colours, but you can specify more than two colours. Colours can be in the form 'red', 'ff0000', or '#ff0000'. For example, `rainbow.setSpectrum('red', 'yellow', 'white');` makes the \"Rainbow\" a colour gradient from red to yellow to white.  \n\n`rainbow.setNumberRange(minNumber, maxNumber);` sets the number range of the Rainbow object. By default, it is 0 to 100.\n\nCommonJS\n--------\n### Installation\n`npm install rainbowvis.js`\n\n### Usage\n    var Rainbow = require('rainbowvis.js');\n    var myRainbow = new Rainbow();\n\nRelated Links\n-----------------\n\n* [RainbowVis-Java](https://github.com/anomal/RainbowVis-Java) - Java version\n* [rainbowvis-rails](https://github.com/Intrepidd/rainbowvis-rails) - RainbowVis Rails gem by Intrepidd\n* [rainbowvis-dart](https://github.com/ilikerobots/rainbowvis-dart) - Dart version by ilikerobots\n* [RainbowVis](https://github.com/danesparza/RainbowVis) - Go version by danesparza\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanomal%2Frainbowvis-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanomal%2Frainbowvis-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanomal%2Frainbowvis-js/lists"}